aboutsummaryrefslogtreecommitdiff
path: root/vimrc
diff options
context:
space:
mode:
authorMax Christian Pohle2015-09-14 14:51:53 +0200
committerMax Christian Pohle2015-09-14 14:51:53 +0200
commite4a3b3ce20fb6db3590b5065678e39817afe9083 (patch)
tree68f19d52725059287ae7a4a3a8017c88341f0ebe /vimrc
parentf11183e8daa88e99215d48bb6c5c726e3d84b06c (diff)
downloadvim-e4a3b3ce20fb6db3590b5065678e39817afe9083.tar.bz2
vim-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--vimrc9
1 files changed, 5 insertions, 4 deletions
diff --git a/vimrc b/vimrc
index 4788809..5d3417b 100644
--- a/vimrc
+++ b/vimrc
@@ -121,13 +121,11 @@ if &t_Co > 2
121 set cursorline | " highlight currently selected line 121 set cursorline | " highlight currently selected line
122endif 122endif
123 123
124if has('mouse')
125 set mouse=a
126endif
127 124
128if has("gui_running") 125if 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
150endif 151endif
151 152
152 153
..