diff options
author | Max Christian Pohle | 2015-09-14 14:51:53 +0200 |
---|---|---|
committer | Max Christian Pohle | 2015-09-14 14:51:53 +0200 |
commit | e4a3b3ce20fb6db3590b5065678e39817afe9083 (patch) | |
tree | 68f19d52725059287ae7a4a3a8017c88341f0ebe /vimrc | |
parent | f11183e8daa88e99215d48bb6c5c726e3d84b06c (diff) | |
download | vim-karlmarks-e4a3b3ce20fb6db3590b5065678e39817afe9083.tar.bz2 vim-karlmarks-e4a3b3ce20fb6db3590b5065678e39817afe9083.zip |
text insertion with middle click over ssh without -X works
problem was set mouse=a, which is default but which needs a gui. GUI is
only available when using ssh -X to connect and sometimes it causes
trouble when using sudo. Deactivated mouse=a in console and replaced it
with mouse=nh which will make the mouse working in help files as usual
and in normal mode, but not in insert mode, where the console should
handle mouse events.
Diffstat (limited to 'vimrc')
-rw-r--r-- | vimrc | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -121,13 +121,11 @@ if &t_Co > 2 | |||
121 | set cursorline | " highlight currently selected line | 121 | set cursorline | " highlight currently selected line |
122 | endif | 122 | endif |
123 | 123 | ||
124 | if has('mouse') | ||
125 | set mouse=a | ||
126 | endif | ||
127 | 124 | ||
128 | if has("gui_running") | 125 | if has("gui_running") |
129 | set guicursor=n-v-c:ver30-Cursor-blinkon500-blinkoff500 | " how the caret looks like | 126 | set mouse=a | " use mouse in gui-mode (which is default) |
130 | set mouseshape+=n:beam,v:beam | " display a text input cursor even in normal and selection mode | 127 | set mouseshape+=n:beam,v:beam | " display a text input cursor even in normal and selection mode |
128 | set guicursor=n-v-c:ver30-Cursor-blinkon500-blinkoff500 | " how the caret looks like | ||
131 | set guitablabel=%t | " do not display full path as tabname | 129 | set guitablabel=%t | " do not display full path as tabname |
132 | set guioptions+=m | " menu bar | 130 | set guioptions+=m | " menu bar |
133 | set guioptions+=T | " toolbar | 131 | set guioptions+=T | " toolbar |
@@ -142,11 +140,14 @@ else | |||
142 | if &term =~? 'mlterm\|xterm\|screen' | 140 | if &term =~? 'mlterm\|xterm\|screen' |
143 | set t_Co=256 | " fixes incompatibilities with our color scheme | 141 | set t_Co=256 | " fixes incompatibilities with our color scheme |
144 | endif | 142 | endif |
143 | set mouse=nh | " limits mouse usage to normal mode and help files, so that middle click text insertion works in insert mode | ||
145 | set title | " set the terminal caption | 144 | set title | " set the terminal caption |
146 | set icon | " sets the terminal icon to vim | 145 | set icon | " sets the terminal icon to vim |
147 | set ttyfast | " modern terminals are all fast in a way | 146 | set ttyfast | " modern terminals are all fast in a way |
148 | "set titleold="vim ended" | " set terminal title after closing vim | 147 | "set titleold="vim ended" | " set terminal title after closing vim |
149 | "set titlestring="VIM-CONSOLE" | " set window title | 148 | "set titlestring="VIM-CONSOLE" | " set window title |
149 | "if has('mouse') | ||
150 | "endif | ||
150 | endif | 151 | endif |
151 | 152 | ||
152 | 153 | ||