├── README.md ├── bin ├── nvim └── nvim-konsole ├── binaries.lst ├── inputrc_nvim ├── install.sh ├── konsole ├── nvim-KeyBindings.keytab └── nvim.profile └── share ├── applications ├── nvim-gui.desktop └── nvim-konsole.desktop └── icons └── hicolor ├── 128x128 └── apps │ └── neovim-mark.png ├── 16x16 └── apps │ └── neovim-mark.png ├── 256x256 └── apps │ └── neovim-mark.png ├── 32x32 └── apps │ └── neovim-mark.png ├── 64x64 └── apps │ └── neovim-mark.png └── scalable └── apps └── neovim-mark.svg /README.md: -------------------------------------------------------------------------------- 1 | ## deprecation notice 2 | I no longer use use Neovim+Konsole so, I do not maintain this repo anymore. 3 | Just use [Alacritty](https://github.com/alacritty/alacritty) with necessary configurations . For eg: see [my dot files]( https://github.com/harish2704/dotFiles/blob/master/home/.config/alacritty/alacritty.yml#L503 ) 4 | 5 | 6 | # neovim-konsole 7 | 8 | This is a wrapper script and configurations files for running nvim as gui text editor in my Ubunutu desktop. 9 | 10 | 11 | I tried to avoid most of key-binding limitations of a console vim. 12 | this wrapper enable us to use 13 | * \ 14 | * \, \ 15 | * \, \ 16 | * Able to map \ \ \ etc.. 17 | etc.. 18 | 19 | Then main reason to choose Konsole terminal emulator is its true-color support and its configurable keybinding mechanism 20 | 21 | This repo also contains desktop configuration files and resized icons required for linux desktop environments 22 | 23 | ## About true color support and cursor shape. 24 | 25 | ### True color support 26 | 27 | Before [ this ]( https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 ) breaking change, 28 | Truecolor support was working by setting `NVIM_TUI_ENABLE_TRUE_COLOR` environment variable. 29 | 30 | Now , it changed to `set termguicolors` vim command. 31 | 32 | ### Cursor shape 33 | 34 | Before [ this ]( https://github.com/neovim/neovim/wiki/Following-HEAD#20160210 ) breaking change, 35 | Cursor shape change was working by 36 | * Setting `NVIM_TUI_ENABLE_CURSOR_SHAPE` environment variable and, 37 | * executing vim command `let &t_SI = "\]50;CursorShape=1\x7" | let &t_SR = "\]50;CursorShape=2\x7" | let &t_EI = "\]50;CursorShape=0\x7"` inside vim. 38 | 39 | Now, it is changed to following vim command 40 | * `set guicursor=n-c:block,i-ci-ve:ver40,r-cr-v:hor20,o:hor50,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor,sm:block-blinkwait175-blinkoff150-blinkon175` 41 | 42 | Neovim uses some environment variables such as `VTE_VERSTION` to detect vte based terminal such as gnome-termnal, `KONSOLE_*` environment variables to detect konsole terminal 43 | 44 | Since konsole is not compatible with [ DECSCUSR ]( http://vt100.net/docs/vt510-rm/DECSCUSR ) sequences, nvim talks to konsole in a different way. 45 | 46 | if we are running nvim-konsole from gnome-termnal , `unset VTE_VERSTION` is required for proper working of cursor shape. It is done by default by `nvim-konsole` script 47 | 48 | ## Installation 49 | 50 | ### Install with [installer-scripts](https://github.com/harish2704/installer-scripts) 51 | `installer-scripts.sh install https://github.com/harish2704/neovim-konsole` 52 | 53 | ### Install manually 54 | * cd Application_dir; 55 | * `./install.sh` 56 | 57 | 58 | 59 | ### Mapping keycodes 60 | Suppose a key binding ( Eg: \ ) is not able map in console vim. 61 | Then we can fix this in the following way 62 | 63 | * Open any Neovim client which supports that key binding ( Eg: here, I opened Neovim python-client for GTK ) 64 | * enter `:terminal` 65 | * then, enter `sed -n l` 66 | * Press your Key binding 67 | * Now, you can see the corresponding terminal keycode for your shortcut. 68 | * Now, Edit your Konsole keytab file ( @ $HOME/.kde/share/apps/konsole ) and add an appropriate entry. 69 | 70 | 71 | ### Screen shot 72 | ![Screen shot](http://i.giphy.com/l2JInHtGIhatbiuRO.gif "Neovim+Konsole on ubuntu 14.04") 73 | 74 | 75 | ### Related links 76 | * My Neovim config files ( https://github.com/harish2704/dotFiles/blob/master/home/.config/nvim/init.vim ) 77 | * A fully configurable file manager called [ SpaceFM ]( http://ignorantguru.github.io/spacefm/ ). Those who like Vim will also like this 78 | -------------------------------------------------------------------------------- /bin/nvim: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | appRoot=$(dirname $(readlink -f $0) ); 4 | 5 | # Disable Ctrl-S 6 | stty stop '' -ixoff 7 | 8 | # env VIMRUNTIME="$appRoot/runtime" "$appRoot/bin/nvim" $@ 9 | env /usr/bin/nvim $@ 10 | -------------------------------------------------------------------------------- /bin/nvim-konsole: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | thisFile=$(readlink -f $0); 4 | appDir="$(dirname $thisFile)/.."; 5 | 6 | # Disable Ctrl-S 7 | stty stop '' -ixoff 8 | 9 | unset VTE_VERSION; 10 | konsole --nofork --dograb --hide-tabbar --hide-menubar --profile nvim -e /usr/bin/nvim "$@" & 11 | # konsole --profile nvim 12 | -------------------------------------------------------------------------------- /binaries.lst: -------------------------------------------------------------------------------- 1 | ./bin/nvim-gui 2 | ./bin/nvim-konsole 3 | ./bin/nvim 4 | -------------------------------------------------------------------------------- /inputrc_nvim: -------------------------------------------------------------------------------- 1 | "\C-j": 2 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | appRoot=$(dirname $(readlink -f $0)); 4 | 5 | cd $appRoot; 6 | echo "Installing desktop file and icons..." 7 | cp -v --parents -r share $HOME/.local/ 8 | 9 | echo "Installing Konsole profile and keybindings..." 10 | cp -v --parents -r konsole $HOME/.kde/share/apps/ 11 | -------------------------------------------------------------------------------- /konsole/nvim-KeyBindings.keytab: -------------------------------------------------------------------------------- 1 | keyboard "nvim" 2 | key Esc : "\E" 3 | key Tab+Shift-Ansi : "\t" 4 | key Tab+Shift+Ansi : "\E[Z" 5 | key Tab-Shift : "\t" 6 | key Backtab-Ansi : "\t" 7 | key Backtab+Ansi : "\E[Z" 8 | key Backspace : "\x7f" 9 | key Return : "\r" 10 | key Return+AnyModifier : "\E[13;*u" 11 | key Ins+AnyModifier : "\E[2;*~" 12 | key Ins-AnyModifier : "\E[2~" 13 | key Ins+KeyPad : "\E[2~" 14 | key Del+AnyModifier : "\E[3;*~" 15 | key Del-AnyModifier : "\E[3~" 16 | key Del+KeyPad : "\E[3~" 17 | key Home+Shift-AppScreen : ScrollUpToTop 18 | key Home+AnyModifier : "\E[1;*H" 19 | key Home+AppCursorKeys-AnyModifier : "\EOH" 20 | key Home-AppCursorKeys-AnyModifier : "\E[H" 21 | key Home+KeyPad-AppCursorKeys : "\E[H" 22 | key Home+KeyPad+AppCursorKeys : "\EOH" 23 | key End+Shift-AppScreen : ScrollDownToBottom 24 | key End+AnyModifier : "\E[1;*F" 25 | key End+AppCursorKeys-AnyModifier : "\EOF" 26 | key End-AppCursorKeys-AnyModifier : "\E[F" 27 | key End+KeyPad-AppCursorKeys : "\E[F" 28 | key End+KeyPad+AppCursorKeys : "\EOF" 29 | key Left-Shift+KeyPad+Ansi-AppCursorKeys : "\E[D" 30 | key Left-Shift+KeyPad+Ansi+AppCursorKeys : "\EOD" 31 | key Left+Shift+AppScreen : "\E[1;*D" 32 | key Left-Shift+Ansi+AnyModifier : "\E[1;*D" 33 | key Left-Shift+Ansi-AppCursorKeys-AnyModifier : "\E[D" 34 | key Left-Shift+Ansi+AppCursorKeys-AnyModifier : "\EOD" 35 | key Left-Shift-Ansi : "\ED" 36 | key Up+Shift-AppScreen : ScrollLineUp 37 | key Up-Shift+KeyPad+Ansi-AppCursorKeys : "\E[A" 38 | key Up-Shift+KeyPad+Ansi+AppCursorKeys : "\EOA" 39 | key Up+Shift+AppScreen : "\E[1;*A" 40 | key Up-Shift+Ansi+AnyModifier : "\E[1;*A" 41 | key Up-Shift+Ansi-AppCursorKeys-AnyModifier : "\E[A" 42 | key Up-Shift+Ansi+AppCursorKeys-AnyModifier : "\EOA" 43 | key Up-Shift-Ansi : "\EA" 44 | key Right-Shift+KeyPad+Ansi-AppCursorKeys : "\E[C" 45 | key Right-Shift+KeyPad+Ansi+AppCursorKeys : "\EOC" 46 | key Right+Shift+AppScreen : "\E[1;*C" 47 | key Right-Shift+Ansi+AnyModifier : "\E[1;*C" 48 | key Right-Shift+Ansi-AppCursorKeys-AnyModifier : "\E[C" 49 | key Right-Shift+Ansi+AppCursorKeys-AnyModifier : "\EOC" 50 | key Right-Shift-Ansi : "\EC" 51 | key Down+Shift-AppScreen : ScrollLineDown 52 | key Down-Shift+KeyPad+Ansi-AppCursorKeys : "\E[B" 53 | key Down-Shift+KeyPad+Ansi+AppCursorKeys : "\EOB" 54 | key Down+Shift+AppScreen : "\E[1;*B" 55 | key Down-Shift+Ansi+AnyModifier : "\E[1;*B" 56 | key Down-Shift+Ansi-AppCursorKeys-AnyModifier : "\E[B" 57 | key Down-Shift+Ansi+AppCursorKeys-AnyModifier : "\EOB" 58 | key Down-Shift-Ansi : "\EB" 59 | key PgUp-AnyModifier : "\E[5~" 60 | key PgUp+AnyModifier : "\E[5;*~" 61 | key PgDown-AnyModifier : "\E[6~" 62 | key PgDown+AnyModifier : "\E[6;*~" 63 | key F1+AnyModifier : "\EO*P" 64 | key F1-AnyModifier : "\EOP" 65 | key F2+AnyModifier : "\EO*Q" 66 | key F2-AnyModifier : "\EOQ" 67 | key F3+AnyModifier : "\EO*R" 68 | key F3-AnyModifier : "\EOR" 69 | key F4+AnyModifier : "\EO*S" 70 | key F4-AnyModifier : "\EOS" 71 | key F5+AnyModifier : "\E[15;*~" 72 | key F5-AnyModifier : "\E[15~" 73 | key F6+AnyModifier : "\E[17;*~" 74 | key F6-AnyModifier : "\E[17~" 75 | key F7+AnyModifier : "\E[18;*~" 76 | key F7-AnyModifier : "\E[18~" 77 | key F8+AnyModifier : "\E[19;*~" 78 | key F8-AnyModifier : "\E[19~" 79 | key F9+AnyModifier : "\E[20;*~" 80 | key F9-AnyModifier : "\E[20~" 81 | key F10+AnyModifier : "\E[21;*~" 82 | key F10-AnyModifier : "\E[21~" 83 | key F11+AnyModifier : "\E[23;*~" 84 | key F11-AnyModifier : "\E[23~" 85 | key F12+AnyModifier : "\E[24;*~" 86 | key F12-AnyModifier : "\E[24~" 87 | key Slash+Control : "\E[47;5u" 88 | -------------------------------------------------------------------------------- /konsole/nvim.profile: -------------------------------------------------------------------------------- 1 | [Appearance] 2 | BoldIntense=true 3 | ColorScheme=GreenOnBlack 4 | Font=Ubuntu Mono,14,-1,5,50,0,0,0,0,0 5 | 6 | [Cursor Options] 7 | CursorShape=0 8 | CustomCursorColor=0,255,0 9 | UseCustomCursorColor=true 10 | 11 | [General] 12 | Icon=neovim-mark 13 | LocalTabTitleFormat=%w 14 | Name=nvim 15 | Parent=FALLBACK/ 16 | RemoteTabTitleFormat=( %w ) 17 | StartInCurrentSessionDir=false 18 | 19 | [Keyboard] 20 | KeyBindings=nvim-KeyBindings 21 | 22 | [Terminal Features] 23 | BidiRenderingEnabled=false 24 | BlinkingCursorEnabled=false 25 | FlowControlEnabled=false 26 | -------------------------------------------------------------------------------- /share/applications/nvim-gui.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Neovim Gui 3 | Exec=pynvim 4 | MimeType=application/javascript;application/python;text/css; 5 | Icon=neovim-mark 6 | Terminal=false 7 | Type=Application 8 | -------------------------------------------------------------------------------- /share/applications/nvim-konsole.desktop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env xdg-open 2 | [Desktop Entry] 3 | Version=1.0 4 | Terminal=false 5 | Type=Application 6 | Name=Neovim Konsole 7 | Exec=nvim-konsole 8 | Icon=neovim-mark 9 | MimeType=application/javascript;application/python;text/css; 10 | -------------------------------------------------------------------------------- /share/icons/hicolor/128x128/apps/neovim-mark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harish2704/neovim-konsole/5952c2219dcdc07d800a67333bf96a2164be2a1a/share/icons/hicolor/128x128/apps/neovim-mark.png -------------------------------------------------------------------------------- /share/icons/hicolor/16x16/apps/neovim-mark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harish2704/neovim-konsole/5952c2219dcdc07d800a67333bf96a2164be2a1a/share/icons/hicolor/16x16/apps/neovim-mark.png -------------------------------------------------------------------------------- /share/icons/hicolor/256x256/apps/neovim-mark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harish2704/neovim-konsole/5952c2219dcdc07d800a67333bf96a2164be2a1a/share/icons/hicolor/256x256/apps/neovim-mark.png -------------------------------------------------------------------------------- /share/icons/hicolor/32x32/apps/neovim-mark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harish2704/neovim-konsole/5952c2219dcdc07d800a67333bf96a2164be2a1a/share/icons/hicolor/32x32/apps/neovim-mark.png -------------------------------------------------------------------------------- /share/icons/hicolor/64x64/apps/neovim-mark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harish2704/neovim-konsole/5952c2219dcdc07d800a67333bf96a2164be2a1a/share/icons/hicolor/64x64/apps/neovim-mark.png -------------------------------------------------------------------------------- /share/icons/hicolor/scalable/apps/neovim-mark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | neovim-mark@2x 4 | Created with Sketch (http://www.bohemiancoding.com/sketch) 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | --------------------------------------------------------------------------------