From b521cfb0c8d5d20b963e64b1557c4887b9747970 Mon Sep 17 00:00:00 2001
From: Max Christian Pohle
Date: Thu, 17 Aug 2017 00:11:21 +0200
Subject: Fixed menus in gvim and did further restructuring

---
 vimrc-full | 151 ++++++++++++++++++++++++++++---------------------------------
 1 file changed, 69 insertions(+), 82 deletions(-)

(limited to 'vimrc-full')

diff --git a/vimrc-full b/vimrc-full
index 5e9f790..ab8c97c 100644
--- a/vimrc-full
+++ b/vimrc-full
@@ -3,17 +3,39 @@
 "=======================================================================================================================
 " GENERAL:
 "=======================================================================================================================
-
 set textwidth=120             | " better done with modeline
 set ts=4 sts=4 sw=4 expandtab | " better done with a modeline
 set redrawtime=1000           | " Timeout in milliseconds for redrawing the display / CTRL+L to retry
 
+" scripts from the default vim installation, which do not get loaded by default, but are useful.
+if filereadable('macros/editexisting')
+  silent :runtime macros/editexisting.vim
+endif
+
+"=======================================================================================================================
+" SHELL
+"=======================================================================================================================
 if filereadable("/bin/bash")
   set shell=/bin/bash           | " many scripts rely on bash, but its path varies why it is commented out here
 elseif filereadable("/usr/local/bin/bash")
   set shell=/usr/local/bin/bash
 endif
 
+"=======================================================================================================================
+" Persistent undo
+"=======================================================================================================================
+if has('persistent_undo')
+  if isdirectory('/dev/shm')
+    set undodir=/dev/shm/     | " save undo file in memory. That is volatile, but fast and we have GIT for longer lasting undos
+  elseif isdirectory('/tmp/')
+    set undodir=/tmp/
+  endif
+  set undofile                  | " preserve undo history when closing and reopening buffers (see :help undo-persistenece)
+endif
+
+"=======================================================================================================================
+" multi byte
+"=======================================================================================================================
 if has("multi_byte")
   scriptencoding utf-8       | " tell vim that we are using utf-8 here
   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")
 " set fillchars+=stlnc:\―       | "
 end
 
-if has('persistent_undo')
-    set undofile                  | " preserve undo history when closing and reopening buffers (see :help undo-persistenece)
 
-    if isdirectory('/dev/shm')
-        set undodir=/dev/shm/     | " save undo file in memory. That is volatile, but fast and we have GIT for longer lasting undos
-    elseif isdirectory('/tmp/')
-        set undodir=/tmp/
-    endif
-endif
-
-" scripts from the default vim installation, which do not get loaded by default, but are useful.
-if filereadable('macros/editexisting')
-  silent :runtime macros/editexisting.vim
-endif
+"=======================================================================================================================
+" SPELL_CHECKING
+"=======================================================================================================================
+let g:spellfile_URL='http://ftp.vim.org/vim/runtime/spell'
+set nospell          | " disable spell checker by default
+set spelllang=en,de  | " languages for the spell checker
+set spellsuggest=10  | " how many words will z= suggest?
+set thesaurus+=~/.vim/thesaurus/php.txt
 
+set dictionary=/usr/share/dict/cracklib-small
+set complete+=k " make default completer <C-N> respect the dictionary
 
 "=======================================================================================================================
+" Cscope
+"=======================================================================================================================
+" http://vim.wikia.com/wiki/Cscope
 if has('cscope') " compiled with cscope support?
-  " http://vim.wikia.com/wiki/Cscope
-  set cscopetag         | " CTRL-] uses cscope first, then ctags
+  set cscopetag  " CTRL-] uses cscope first, then ctags
   set cscopeverbose
 
   if has('quickfix')
@@ -63,54 +84,59 @@ if has('cscope') " compiled with cscope support?
   endif
 
   if has('menu')
-        menu &CScope.add
-        \ :cscope add .<CR>
-
-        menu &CScope.show
-        \ :cscope show<CR>
-
-        menu &CScope.reset
-        \ :cscope reset<CR>
-
-        menu &CScope.-Sep-
-        \ :
-
         menu &Cscope.find.C\ symbol
         \ :cscope find s <cword><CR>
-
         menu &Cscope.find.definition
         \ :cscope find g <cword><CR>
-
         menu &Cscope.find.functions\ called\ by\ this
         \ :cscope find d <cword><CR>
-
         menu &Cscope.find.functions\ calling\ this
         \ :cscope find c <cword><CR>
-
         menu &Cscope.find.text\ string
         \ :cscope find t <cword><CR>
-
         menu &Cscope.find.egrep\ pattern
         \ :cscope find e <cword><CR>
-
         menu &Cscope.find.this\ file
         \ :cscope find f <cword><CR>
-
         menu &Cscope.find.files\ including\ this\ file
         \ :cscope find i <cword><CR>
-
         menu &Cscope.find.places\ where\ this\ symbol\ is\ assigned\ a\ value
         \ :cscope find a <cword><CR>
+        menu &Cscope.-Sep-
+        \ :
+        menu &Cscope.add
+        \ :cscope add .<CR>
+        menu &Cscope.show
+        \ :cscope show<CR>
+        menu &Cscope.reset
+        \ :cscope reset<CR>
   endif
-  " cnoreabbrev csa cs add
-  " cnoreabbrev csf cs find
-  " cnoreabbrev csk cs kill
-  " cnoreabbrev csr cs reset
-  " cnoreabbrev css cs show
-  " cnoreabbrev csh cs help
-  let @c = ":cs find s <cword>"
 endif
 
+" =======================================================================================================================
+" GUI_VERSION
+" =======================================================================================================================
+if has("gui_running")
+  set guicursor=a:block-blinkon100
+  set browsedir=buffer
+  set toolbar+=text
+  set guiheadroom=0
+  set guioptions+=eig
+  set guioptions-=T   | " toolbar
+  set guioptions+=c   | " use console dialogs instead of popups
+  set guioptions+=a   | " autoselect: copy&paste using middleclick
+  set guioptions+=m   | " remove menu
+  set guioptions-=e   | " do not display tabs
+  set guioptions-=L   | " do not show left scrollbar
+  set guioptions-=r   | " do not show right scrollbar
+  set winaltkeys=menu | " behave like other windows: ALT-key can be used to open the menu (and cannot be :remaped)
+  " set guifont=Dejavu\ Sans\ Mono\ for\ Powerline\ 10
+  " set guifont=Source\ Code\ Pro\ Semi-Bold\ 10
+  " set guifont=Droid\ Sans\ Mono\ for\ Powerline\ 12
+  set guifont=Dejavu\ Sans\ Mono\ For\ Powerline\ Semibold
+" set selectmode=mouse,key,cmd  | " enters vim's select mode when pressing shift-left or shift-END
+" set keymodel=startsel,stopsel | " makes shift-left, shift-right available for selecting text
+endif
 
 " =======================================================================================================================
 "  SETTINGS:
@@ -178,23 +204,6 @@ set equalalways               | " do not evenly size windows when opening new or
 set nocursorline              | " turn visual cursor line off (improves performance)
 "=======================================================================================================================
 
-
-
-
-"=======================================================================================================================
-" SPELL_CHECKING:
-"=======================================================================================================================
-let g:spellfile_URL='http://ftp.vim.org/vim/runtime/spell'
-set nospell          | " disable spell checker by default
-set spelllang=en,de  | " languages for the spell checker
-set spellsuggest=10  | " how many words will z= suggest?
-set thesaurus+=~/.vim/thesaurus/php.txt
-
-set dictionary=/usr/share/dict/cracklib-small
-set complete+=k " make default completer <C-N> respect the dictionary
-
-
-
 if has('autocmd')
     " autocmd VimEnter * let &t_EI .= "\<Esc>[0 q"
     " autocmd VimEnter * let &t_SI = "\<Esc>]12;green\x7"
@@ -202,28 +211,6 @@ if has('autocmd')
 endif
 
 
-" GUI_VERSION:
-if has("gui_running")
-  set guicursor=a:block-blinkon100
-  set browsedir=buffer
-  set toolbar+=text
-  set guiheadroom=0
-  set guioptions+=eig
-  set guioptions-=T   | " toolbar
-  set guioptions+=c   | " use console dialogs instead of popups
-  set guioptions+=a   | " autoselect: copy&paste using middleclick
-  set guioptions+=m   | " remove menu
-  set guioptions-=e   | " do not display tabs
-  set guioptions-=L   | " do not show left scrollbar
-  set guioptions-=r   | " do not show right scrollbar
-  set winaltkeys=menu | " behave like other windows: ALT-key can be used to open the menu (and cannot be :remaped)
-  " set guifont=Dejavu\ Sans\ Mono\ for\ Powerline\ 10
-  " set guifont=Source\ Code\ Pro\ Semi-Bold\ 10
-  " set guifont=Droid\ Sans\ Mono\ for\ Powerline\ 12
-  set guifont=Dejavu\ Sans\ Mono\ For\ Powerline\ Semibold
-" set selectmode=mouse,key,cmd  | " enters vim's select mode when pressing shift-left or shift-END
-" set keymodel=startsel,stopsel | " makes shift-left, shift-right available for selecting text
-endif
 
 " NEOVIM_incompatible:
 if !has('nvim')       | " settings which have been removed from neovim
-- 
cgit v1.2.3