aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Christian Pohle2017-08-17 00:11:21 +0200
committerMax Christian Pohle2017-08-17 00:11:40 +0200
commitb521cfb0c8d5d20b963e64b1557c4887b9747970 (patch)
tree84bba842521a5efaa74db8735f1987235b624e9c
parent0c225499227c94b089b65fc0a9f5752e0d2b16f5 (diff)
downloadvim-b521cfb0c8d5d20b963e64b1557c4887b9747970.tar.bz2
vim-b521cfb0c8d5d20b963e64b1557c4887b9747970.zip
Fixed menus in gvim and did further restructuring
-rw-r--r--vimrc-full151
1 files changed, 69 insertions, 82 deletions
diff --git a/vimrc-full b/vimrc-full
index 5e9f790..ab8c97c 100644
--- a/vimrc-full
+++ b/vimrc-full
@@ -3,17 +3,39 @@
3"======================================================================================================================= 3"=======================================================================================================================
4" GENERAL: 4" GENERAL:
5"======================================================================================================================= 5"=======================================================================================================================
6
7set textwidth=120 | " better done with modeline 6set textwidth=120 | " better done with modeline
8set ts=4 sts=4 sw=4 expandtab | " better done with a modeline 7set ts=4 sts=4 sw=4 expandtab | " better done with a modeline
9set redrawtime=1000 | " Timeout in milliseconds for redrawing the display / CTRL+L to retry 8set redrawtime=1000 | " Timeout in milliseconds for redrawing the display / CTRL+L to retry
10 9
10" scripts from the default vim installation, which do not get loaded by default, but are useful.
11if filereadable('macros/editexisting')
12 silent :runtime macros/editexisting.vim
13endif
14
15"=======================================================================================================================
16" SHELL
17"=======================================================================================================================
11if filereadable("/bin/bash") 18if filereadable("/bin/bash")
12 set shell=/bin/bash | " many scripts rely on bash, but its path varies why it is commented out here 19 set shell=/bin/bash | " many scripts rely on bash, but its path varies why it is commented out here
13elseif filereadable("/usr/local/bin/bash") 20elseif filereadable("/usr/local/bin/bash")
14 set shell=/usr/local/bin/bash 21 set shell=/usr/local/bin/bash
15endif 22endif
16 23
24"=======================================================================================================================
25" Persistent undo
26"=======================================================================================================================
27if has('persistent_undo')
28 if isdirectory('/dev/shm')
29 set undodir=/dev/shm/ | " save undo file in memory. That is volatile, but fast and we have GIT for longer lasting undos
30 elseif isdirectory('/tmp/')
31 set undodir=/tmp/
32 endif
33 set undofile | " preserve undo history when closing and reopening buffers (see :help undo-persistenece)
34endif
35
36"=======================================================================================================================
37" multi byte
38"=======================================================================================================================
17if has("multi_byte") 39if has("multi_byte")
18 scriptencoding utf-8 | " tell vim that we are using utf-8 here 40 scriptencoding utf-8 | " tell vim that we are using utf-8 here
19 set encoding=utf-8 | " we need default utf-8 encoding to use cool chars as line break and so on (see below) 41 set encoding=utf-8 | " we need default utf-8 encoding to use cool chars as line break and so on (see below)
@@ -36,26 +58,25 @@ if has("multi_byte")
36" set fillchars+=stlnc:\― | " 58" set fillchars+=stlnc:\― | "
37end 59end
38 60
39if has('persistent_undo')
40 set undofile | " preserve undo history when closing and reopening buffers (see :help undo-persistenece)
41 61
42 if isdirectory('/dev/shm') 62"=======================================================================================================================
43 set undodir=/dev/shm/ | " save undo file in memory. That is volatile, but fast and we have GIT for longer lasting undos 63" SPELL_CHECKING
44 elseif isdirectory('/tmp/') 64"=======================================================================================================================
45 set undodir=/tmp/ 65let g:spellfile_URL='http://ftp.vim.org/vim/runtime/spell'
46 endif 66set nospell | " disable spell checker by default
47endif 67set spelllang=en,de | " languages for the spell checker
48 68set spellsuggest=10 | " how many words will z= suggest?
49" scripts from the default vim installation, which do not get loaded by default, but are useful. 69set thesaurus+=~/.vim/thesaurus/php.txt
50if filereadable('macros/editexisting')
51 silent :runtime macros/editexisting.vim
52endif
53 70
71set dictionary=/usr/share/dict/cracklib-small
72set complete+=k " make default completer <C-N> respect the dictionary
54 73
55"======================================================================================================================= 74"=======================================================================================================================
75" Cscope
76"=======================================================================================================================
77" http://vim.wikia.com/wiki/Cscope
56if has('cscope') " compiled with cscope support? 78if has('cscope') " compiled with cscope support?
57 " http://vim.wikia.com/wiki/Cscope 79 set cscopetag " CTRL-] uses cscope first, then ctags
58 set cscopetag | " CTRL-] uses cscope first, then ctags
59 set cscopeverbose 80 set cscopeverbose
60 81
61 if has('quickfix') 82 if has('quickfix')
@@ -63,54 +84,59 @@ if has('cscope') " compiled with cscope support?
63 endif 84 endif
64 85
65 if has('menu') 86 if has('menu')
66 menu &CScope.add
67 \ :cscope add .<CR>
68
69 menu &CScope.show
70 \ :cscope show<CR>
71
72 menu &CScope.reset
73 \ :cscope reset<CR>
74
75 menu &CScope.-Sep-
76 \ :
77
78 menu &Cscope.find.C\ symbol 87 menu &Cscope.find.C\ symbol
79 \ :cscope find s <cword><CR> 88 \ :cscope find s <cword><CR>
80
81 menu &Cscope.find.definition 89 menu &Cscope.find.definition
82 \ :cscope find g <cword><CR> 90 \ :cscope find g <cword><CR>
83
84 menu &Cscope.find.functions\ called\ by\ this 91 menu &Cscope.find.functions\ called\ by\ this
85 \ :cscope find d <cword><CR> 92 \ :cscope find d <cword><CR>
86
87 menu &Cscope.find.functions\ calling\ this 93 menu &Cscope.find.functions\ calling\ this
88 \ :cscope find c <cword><CR> 94 \ :cscope find c <cword><CR>
89
90 menu &Cscope.find.text\ string 95 menu &Cscope.find.text\ string
91 \ :cscope find t <cword><CR> 96 \ :cscope find t <cword><CR>
92
93 menu &Cscope.find.egrep\ pattern 97 menu &Cscope.find.egrep\ pattern
94 \ :cscope find e <cword><CR> 98 \ :cscope find e <cword><CR>
95
96 menu &Cscope.find.this\ file 99 menu &Cscope.find.this\ file
97 \ :cscope find f <cword><CR> 100 \ :cscope find f <cword><CR>
98
99 menu &Cscope.find.files\ including\ this\ file 101 menu &Cscope.find.files\ including\ this\ file
100 \ :cscope find i <cword><CR> 102 \ :cscope find i <cword><CR>
101
102 menu &Cscope.find.places\ where\ this\ symbol\ is\ assigned\ a\ value 103 menu &Cscope.find.places\ where\ this\ symbol\ is\ assigned\ a\ value
103 \ :cscope find a <cword><CR> 104 \ :cscope find a <cword><CR>
105 menu &Cscope.-Sep-
106 \ :
107 menu &Cscope.add
108 \ :cscope add .<CR>
109 menu &Cscope.show
110 \ :cscope show<CR>
111 menu &Cscope.reset
112 \ :cscope reset<CR>
104 endif 113 endif
105 " cnoreabbrev csa cs add
106 " cnoreabbrev csf cs find
107 " cnoreabbrev csk cs kill
108 " cnoreabbrev csr cs reset
109 " cnoreabbrev css cs show
110 " cnoreabbrev csh cs help
111 let @c = ":cs find s <cword>"
112endif 114endif
113 115
116" =======================================================================================================================
117" GUI_VERSION
118" =======================================================================================================================
119if has("gui_running")
120 set guicursor=a:block-blinkon100
121 set browsedir=buffer
122 set toolbar+=text
123 set guiheadroom=0
124 set guioptions+=eig
125 set guioptions-=T | " toolbar
126 set guioptions+=c | " use console dialogs instead of popups
127 set guioptions+=a | " autoselect: copy&paste using middleclick
128 set guioptions+=m | " remove menu
129 set guioptions-=e | " do not display tabs
130 set guioptions-=L | " do not show left scrollbar
131 set guioptions-=r | " do not show right scrollbar
132 set winaltkeys=menu | " behave like other windows: ALT-key can be used to open the menu (and cannot be :remaped)
133 " set guifont=Dejavu\ Sans\ Mono\ for\ Powerline\ 10
134 " set guifont=Source\ Code\ Pro\ Semi-Bold\ 10
135 " set guifont=Droid\ Sans\ Mono\ for\ Powerline\ 12
136 set guifont=Dejavu\ Sans\ Mono\ For\ Powerline\ Semibold
137" set selectmode=mouse,key,cmd | " enters vim's select mode when pressing shift-left or shift-END
138" set keymodel=startsel,stopsel | " makes shift-left, shift-right available for selecting text
139endif
114 140
115" ======================================================================================================================= 141" =======================================================================================================================
116" SETTINGS: 142" SETTINGS:
@@ -178,23 +204,6 @@ set equalalways | " do not evenly size windows when opening new or
178set nocursorline | " turn visual cursor line off (improves performance) 204set nocursorline | " turn visual cursor line off (improves performance)
179"======================================================================================================================= 205"=======================================================================================================================
180 206
181
182
183
184"=======================================================================================================================
185" SPELL_CHECKING:
186"=======================================================================================================================
187let g:spellfile_URL='http://ftp.vim.org/vim/runtime/spell'
188set nospell | " disable spell checker by default
189set spelllang=en,de | " languages for the spell checker
190set spellsuggest=10 | " how many words will z= suggest?
191set thesaurus+=~/.vim/thesaurus/php.txt
192
193set dictionary=/usr/share/dict/cracklib-small
194set complete+=k " make default completer <C-N> respect the dictionary
195
196
197
198if has('autocmd') 207if has('autocmd')
199 " autocmd VimEnter * let &t_EI .= "\<Esc>[0 q" 208 " autocmd VimEnter * let &t_EI .= "\<Esc>[0 q"
200 " autocmd VimEnter * let &t_SI = "\<Esc>]12;green\x7" 209 " autocmd VimEnter * let &t_SI = "\<Esc>]12;green\x7"
@@ -202,28 +211,6 @@ if has('autocmd')
202endif 211endif
203 212
204 213
205" GUI_VERSION:
206if has("gui_running")
207 set guicursor=a:block-blinkon100
208 set browsedir=buffer
209 set toolbar+=text
210 set guiheadroom=0
211 set guioptions+=eig
212 set guioptions-=T | " toolbar
213 set guioptions+=c | " use console dialogs instead of popups
214 set guioptions+=a | " autoselect: copy&paste using middleclick
215 set guioptions+=m | " remove menu
216 set guioptions-=e | " do not display tabs
217 set guioptions-=L | " do not show left scrollbar
218 set guioptions-=r | " do not show right scrollbar
219 set winaltkeys=menu | " behave like other windows: ALT-key can be used to open the menu (and cannot be :remaped)
220 " set guifont=Dejavu\ Sans\ Mono\ for\ Powerline\ 10
221 " set guifont=Source\ Code\ Pro\ Semi-Bold\ 10
222 " set guifont=Droid\ Sans\ Mono\ for\ Powerline\ 12
223 set guifont=Dejavu\ Sans\ Mono\ For\ Powerline\ Semibold
224" set selectmode=mouse,key,cmd | " enters vim's select mode when pressing shift-left or shift-END
225" set keymodel=startsel,stopsel | " makes shift-left, shift-right available for selecting text
226endif
227 214
228" NEOVIM_incompatible: 215" NEOVIM_incompatible:
229if !has('nvim') | " settings which have been removed from neovim 216if !has('nvim') | " settings which have been removed from neovim
..