diff --git a/.gitmodules b/.gitmodules index b605cb0..434b299 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "vim/bundle/vim-multiple-cursors"] - path = vim/bundle/vim-multiple-cursors - url = https://github.com/terryma/vim-multiple-cursors.git [submodule "vim/bundle/SudoEdit.vim"] path = vim/bundle/SudoEdit.vim url = https://github.com/vim-scripts/SudoEdit.vim.git @@ -34,9 +31,6 @@ [submodule "vim/bundle/neocomplcache.vim"] path = vim/bundle/neocomplcache.vim url = https://github.com/Shougo/neocomplcache.vim.git -[submodule "vim/bundle/vim-fugitive"] - path = vim/bundle/vim-fugitive - url = https://github.com/tpope/vim-fugitive.git [submodule "vim/bundle/emmet-vim"] path = vim/bundle/emmet-vim url = https://github.com/mattn/emmet-vim.git @@ -46,6 +40,3 @@ [submodule "vim/bundle/nerdtree"] path = vim/bundle/nerdtree url = https://github.com/scrooloose/nerdtree.git -[submodule "vim/bundle/perlomni.vim"] - path = vim/bundle/perlomni.vim - url = https://github.com/c9s/perlomni.vim.git diff --git a/vim/bundle/emmet-vim b/vim/bundle/emmet-vim index 7261087..9b80875 160000 --- a/vim/bundle/emmet-vim +++ b/vim/bundle/emmet-vim @@ -1 +1 @@ -Subproject commit 72610878e4107ada46d3e87c3a85001064439814 +Subproject commit 9b80875e074eeb0ee2ed637876d1b91d54733dd2 diff --git a/vim/bundle/perlomni.vim b/vim/bundle/perlomni.vim deleted file mode 160000 index 60b39ac..0000000 --- a/vim/bundle/perlomni.vim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 60b39ac6cd59ff14022fc024f1f0a7121a93c952 diff --git a/vim/bundle/vim-fugitive b/vim/bundle/vim-fugitive deleted file mode 160000 index f395f3c..0000000 --- a/vim/bundle/vim-fugitive +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f395f3cbeaa353ff1545c3c8f86b2fef65003592 diff --git a/vim/bundle/vim-multiple-cursors b/vim/bundle/vim-multiple-cursors deleted file mode 160000 index 35028be..0000000 --- a/vim/bundle/vim-multiple-cursors +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 35028be1f71953da9f2c28509bf6c5ebd1d31c28 diff --git a/vim/colors/darkcloud.vim b/vim/colors/darkcloud.vim index 0fc463f..ca05eb5 100644 --- a/vim/colors/darkcloud.vim +++ b/vim/colors/darkcloud.vim @@ -276,16 +276,16 @@ call s:X("Normal","bcbcbc","262626","","White",s:termBlack) call s:X("Pmenu","87d7ff","303030","","Grey","LightBlue") call s:X("PmenuSel","87d7ff","4e4e4e","bold","White","Black") -call s:X("CursorLine","","3a3a3a","bold","",s:termBlack) +call s:X("CursorLine","","303030","","",s:termBlack) call s:X("CursorLineNr","000000","87d7ff","bold",s:termBlack,"Blue") -call s:X("CursorColumn","","3a3a3a","","",s:termBlack) -call s:X("MatchParen","","87d7ff","bold","","Blue") +call s:X("CursorColumn","","303030","","",s:termBlack) +call s:X("MatchParen","","000000","standout","","000000") call s:X("TabLine","","000000","","",s:termBlack) call s:X("TabLineFill","","000000","","",s:termBlack) call s:X("TabLineSel","000000","ffffff","",s:termBlack,"White") -call s:X("Visual","","3a3a3a","","",s:termBlack) +call s:X("Visual","","3a3a3a","bold","",s:termBlack) call s:X("Cursor","000000","ffff00","underline",s:termBlack,"Yellow") call s:X("LineNr","ffaf00","","","Red","") diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index c0e8fec..bf4b6c9 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -1,17 +1,14 @@ "===========================" -" " " Keyboard Configuration: " -" " "===========================" " " Reference: (view plugin documentation for the full list of commands each offers) -" , | (A) -> follows an emme term to expand it (ie: 'html:5') +" , | (A) -> follows an emme term to expand it (ie: 'html:5') " | (N) -> toggle hexhighlight's hexcode to colours in :gui -" cs'" | (N) -> replace surrounding '' with "" (other delims work) -" cs" | (N) -> replace surrounding "" with tags -" cst" | (N) -> replace any tag (ie: ) with quotes -" ds | (N) -> removes delimiters -" | (N) -> mark for multiple cursors, or select the next match +" cs'" | (N) -> change surrounding '' to "" (any delimiters work) +" cs" | (N) -> change surrounding "" to the tag: +" cst" | (N) -> change any surrounding tag to "" +" ds" | (N) -> delete surrounding "" " " Mappings: " | (A) -> go to the next open tab @@ -28,14 +25,6 @@ " | (N) -> format document and return to current line " | (N) -> remove whitespace " -" (git-fugitive) -" G | (N) -> Git : view the menu -" gc | (N) -> Gcommit : make a commit -" gd | (N) -> Gdiff * : show differences since the last commit -" ge | (N) -> Gedit : edit the git metadata -" gl | (N) -> Glog : view the commit and differences log -" gs | (N) -> Gstatus : view status info about the git repo -" " (neocomplcache) " | (I) -> write the part common to all suggestions " | (I) -> cancle the match dialog (during suggestion) @@ -47,95 +36,88 @@ " | (A) -> toggle the scrollbar " " Aliases: -" :mc | (N) -> :MultipleCursorsFind (multiple cursors via regex) " :wsudo | (N) -> :SudoWrite (write the file as root using sudo) -" :rsudo | (N) -> :SudoRead (read a file as root using sudo) +" :esudo | (N) -> :SudoRead (read a file as root using sudo) " " Notes: " *by the default key is: \ " -"===========" -" Mappings: " -"===========" -"tab and untabbing selected blocks -vmap >gv -vmap >gv + vmap n ':tabn' -nnoremap p ':tabp' + "move to the next and previous tabs + nnoremap n ':tabn' + nnoremap p ':tabp' -"toggle the nerd tree sidebar -nnoremap ':NERDTree' + "toggle the cursor line and column + nnoremap ':set cursorline! cursorcolumn!' -"toggle the tagbar sidebar -nnoremap ':TagbarToggle' + "toggle the display of line numbers + nnoremap ':set number!' -"toggle the cursor line and column -nnoremap ':set cursorline! cursorcolumn!' + "toggle line wrapping (and bottom bar if using the gui) + if !has("gui_running") + nnoremap ':set wrap!' + else + nnoremap ':set wrap! go'.'-+'[&wrap]."=b\r" + endif -"toggle the display of line numbers -nnoremap ':set number!' + "toggle the display of whitespace + nnoremap ':set list!' -"toggle line wrapping (and bottom bar if using the gui) -if !has("gui_running") - nnoremap ':set wrap!' -else - nnoremap ':set wrap! go'.'-+'[&wrap]."=b\r" -endif + "toggle folded code at foldpoints + inoremap za + nnoremap za + onoremap za + vnoremap zf -"toggle the display of whitespace -nnoremap ':set list!' + "format document then return to current line + nnoremap mzgg=G`z -"toggle folded code at foldpoints -inoremap za -nnoremap za -onoremap za -vnoremap zf + "remove trailing white space + nnoremap ':FixWhitespace' -"format document then return to current line -nnoremap mzgg=G`z + "map shift to enable middle-click paste while being held + map + map! +"}}} -"remove trailing white space -nnoremap ':FixWhitespace' +"PLUGIN KEYBINDINGS {{{ + "toggle the nerd tree sidebar + nnoremap ':NERDTree' -"various git fugitive functions -nnoremap G ':Git' -nnoremap gc ':Gcommit' -nnoremap gd ':Gdiff *' -nnoremap ge ':Gedit' -nnoremap gl ':Glog' -nnoremap gs ':Gstatus' + "toggle the tagbar sidebar + nnoremap ':TagbarToggle' -"neocomplcache suggestions: cancel, autocomplete, scroll up and scroll down -inoremap pumvisible() ? neocomplcache#complete_common_string() : "\" -inoremap pumvisible() ? neocomplcache#close_popup() : "\" -inoremap neocomplcache#undo_completion() + "neocomplcache suggestions: cancel, autocomplete, scroll up and scroll down + inoremap pumvisible() ? neocomplcache#complete_common_string() : "\" + inoremap pumvisible() ? neocomplcache#close_popup() : "\" + inoremap neocomplcache#undo_completion() -"compatibility hack for proper keyboard config in screen/tmux -if $TERM =~ '^screen-256color' - nmap OH - imap OH - nmap OF - imap OF -endif + "emmet switch triggerkey from to + let g:user_emmet_leader_key='' +"}}} -"================" -" GVim Mappings: " -"================" -"map toggles for the menu, toolbar and scrollbar -noremap ":if &go=~#'m'set go-=melseset go+=mendif" -noremap ":if &go=~#'T'set go-=Telseset go+=Tendif" -noremap ":if &go=~#'r'set go-=relseset go+=rendif" +"TMUX AND SCREEN COMPATIBILITY: SOME HACKS TO MAKE THINGS WORK RIGHT {{{ + if $TERM =~ '^screen-256color' + nmap OH + imap OH + nmap OF + imap OF + endif +"}}} -"enable middle-click paste while holding shift -map -map! +"GVIM: MAPPINGS FOR GUI ELEMENTS {{{ + "map toggles for the menu, toolbar and scrollbar + noremap ":if &go=~#'m'set go-=melseset go+=mendif" + noremap ":if &go=~#'T'set go-=Telseset go+=Tendif" + noremap ":if &go=~#'r'set go-=relseset go+=rendif" +"}}} -"==========" -" Aliases: " -"==========" -cabbrev mc MultipleCursorsFind -cabbrev wsudo SudoWrite -cabbrev rsudo SudoRead +"ALIASES: COMMAND SHORTCUTS {{{ + cabbrev wsudo SudoWrite + cabbrev esudo SudoRead +"}}} diff --git a/vim/config/plugins.vim b/vim/config/plugins.vim index 03904a9..feb4f95 100644 --- a/vim/config/plugins.vim +++ b/vim/config/plugins.vim @@ -1,22 +1,25 @@ "==========================" -" " " Plugins Configuration: " -" " "==========================" "PATHOGEN BUNDLED EXTENSIONS PLUGIN: LOAD BUNDLED PLUGINS {{{" execute pathogen#infect() "}}} +"EMMET: CONFIGURE WHEN ZENCODING IS ENABLED {{{ + let g:user_emmet_install_global = 0 + autocmd FileType html,css,php,aspx EmmetInstall +"}}} + "NEOCOMPLCACHE AUTOCOMPLETION PLUGIN: ENABLE, CONFIG AND SETUP OMNICOMPLETION {{{" - let g:neocomplcache_enable_at_startup = 1 - let g:neocomplcache_enable_smart_case = 1 - let g:neocomplcache_min_syntax_length = 3 + let g:neocomplcache_enable_at_startup=1 + let g:neocomplcache_enable_smart_case=1 + let g:neocomplcache_min_syntax_length=3 let g:neocomplcache_max_list=10 - let g:neocomplcache_enable_insert_char_pre = 1 - let g:neocomplcache_enable_underbar_completion = 1 - let g:neocomplcache_enable_camel_case_completion = 1 - let g:neocomplcache_wildcard_characters = {'_': '-'} + let g:neocomplcache_enable_insert_char_pre=1 + let g:neocomplcache_enable_underbar_completion=1 + let g:neocomplcache_enable_camel_case_completion=1 + let g:neocomplcache_wildcard_characters={'_': '-'} if has("autocmd") && exists("+omnifunc") autocmd Filetype * if &omnifunc == "" | setlocal omnifunc=syntaxcomplete#Complete | endif @@ -28,9 +31,9 @@ autocmd FileType ruby set omnifunc=rubycomplete#Complete autocmd FileType php setlocal omnifunc=phpcomplete#CompletePHP - if !exists('g:neocomplcache_omni_patterns') | let g:neocomplcache_omni_patterns = {} | endif - let g:neocomplcache_omni_patterns.c = '[^.[:digit:] *\t]\%(\.\|->\)' - let g:neocomplcache_omni_patterns.cpp = '[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::' + if !exists('g:neocomplcache_omni_patterns') | let g:neocomplcache_omni_patterns={} | endif + let g:neocomplcache_omni_patterns.c='[^.[:digit:] *\t]\%(\.\|->\)' + let g:neocomplcache_omni_patterns.cpp='[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::' let g:neocomplcache_omni_patterns.xml='<[^>]*' let g:neocomplcache_omni_patterns.html='<[^>]*' let g:neocomplcache_omni_patterns.xhtml='<[^>]*' @@ -38,18 +41,17 @@ let g:neocomplcache_omni_patterns.css='^\s\+\w+\|\w+[):;]?\s\+\|[@!]' let g:neocomplcache_omni_patterns.less='^\s\+\w+\|\w+[):;]?\s\+\|[@!]' let g:neocomplcache_omni_patterns.javascript='[^. \t]\.\%(\h\w*\)\?' - let g:neocomplcache_omni_patterns.python = '[^. *\t]\.\h\w*\|\h\w*::' - let g:neocomplcache_omni_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::' - let g:neocomplcache_omni_patterns.php = '[^. \t]->\h\w*\|\h\w*::' - - let g:neocomplcache_omni_patterns.actionscript = '[^. \t][.:]\h\w*' - let g:neocomplcache_omni_patterns.python3 = '[^. *\t]\.\h\w*\|\h\w*::' - let g:neocomplcache_omni_patterns.go = '\h\w*\%.' - let g:neocomplcache_omni_patterns.perl = '\h\w*->\h\w*\|\h\w*::' - let g:neocomplcache_omni_patterns.java = '\%(\h\w*\|)\)\.' - let g:neocomplcache_omni_patterns.objc = '\h\w\+\|\h\w*\%(\.\|->\)\h\w*' - let g:neocomplcache_omni_patterns.objj = '[\[ \.]\w\+$\|:\w*$' - let g:neocomplcache_omni_patterns.vimshell= '\%(\\[^[:alnum:].-]\|[[:alnum:]@/.-_+,#$%~=*]\)\{2,}' + let g:neocomplcache_omni_patterns.python='[^. *\t]\.\h\w*\|\h\w*::' + let g:neocomplcache_omni_patterns.ruby='[^. *\t]\.\w*\|\h\w*::' + let g:neocomplcache_omni_patterns.php='[^. \t]->\h\w*\|\h\w*::' + let g:neocomplcache_omni_patterns.actionscript='[^. \t][.:]\h\w*' + let g:neocomplcache_omni_patterns.python3='[^. *\t]\.\h\w*\|\h\w*::' + let g:neocomplcache_omni_patterns.go='\h\w*\%.' + let g:neocomplcache_omni_patterns.perl='\h\w*->\h\w*\|\h\w*::' + let g:neocomplcache_omni_patterns.java='\%(\h\w*\|)\)\.' + let g:neocomplcache_omni_patterns.objc='\h\w\+\|\h\w*\%(\.\|->\)\h\w*' + let g:neocomplcache_omni_patterns.objj='[\[ \.]\w\+$\|:\w*$' + let g:neocomplcache_omni_patterns.vimshell='\%(\\[^[:alnum:].-]\|[[:alnum:]@/.-_+,#$%~=*]\)\{2,}' "}}} "ASPNET ABSHIRE SYNTAX PLUGIN: {{{ diff --git a/vim/config/settings.vim b/vim/config/settings.vim index 91a975d..d2735cf 100644 --- a/vim/config/settings.vim +++ b/vim/config/settings.vim @@ -1,82 +1,75 @@ "===============================" -" " " Vim Settings Configuration: " -" " "===============================" -"================" -" Compatibility: " -"================" -set nocompatible "enable vim specific capabilities" -set lazyredraw "only redraw what needs to be redrawn" -set encoding=utf-8 "set encoding" -set fileformats=unix,dos,mac "set compatible line endings in order of preference" +"COMPATIBILITY SETTINGS: DOCUMENT AND ENVIRONMENT SETTINGS {{{ + set nocompatible "enable vim specific capabilities" + set lazyredraw "only redraw what needs to be redrawn" + set encoding=utf-8 "set encoding" + set fileformats=unix,dos,mac "set compatible line endings in order of preference" -if $TERM =~ '^linux' - set t_Co=8 "use 8 colours when a vterm is detected -elseif !has("gui_running") - set t_Co=256 "assume 256 colours when any other terminal is detected -endif + if $TERM =~ '^linux' + set t_Co=8 "use 8 colours when a vterm is detected + elseif !has("gui_running") + set t_Co=256 "assume 256 colours when any other terminal is detected + endif +"}}} -"=========" -" Syntax: " -"=========" -filetype plugin indent on -syntax on "turn syntax highlighting on -set foldmethod=syntax foldcolumn=1 foldlevel=8 "configure how folding code works +"SYNTAX: INDENTING, HIGHLIGHTING, FOLDING {{{ + filetype plugin indent on + syntax on "turn syntax highlighting on + set foldmethod=syntax foldcolumn=1 foldlevel=8 "configure how folding code works +"}}} -"============" -" Filetypes: " -"============" -au BufNewFile,BufRead *.txt set spell "enable spellcheck for text files (*.txt) -au BufNewFile,BufRead *tmux.conf setf sh "set syntax for *tmux.conf to sh (bash) -au BufNewFile,BufRead pacman.conf setf sh "set syntax for *tmux.conf to sh (bash) -au BufNewFile,BufRead yaourtrc setf sh "set syntax for *tmux.conf to sh (bash) -au BufNewFile,BufRead cjdroute.conf setf javascript "set syntax for *cjdroute.conf to javascript -au BufNewFile,BufRead ircd.conf setf javascript "set syntax for *ircd.conf to javascript +"FILETYPES: SETTINGS SPECIFIC TO A FILETYPE {{{ + au BufNewFile,BufRead *.txt set spell "enable spellcheck for text files (*.txt) + au BufNewFile,BufRead *tmux.conf setf sh "set syntax for *tmux.conf to sh (bash) + au BufNewFile,BufRead pacman.conf setf sh "set syntax for *tmux.conf to sh (bash) + au BufNewFile,BufRead yaourtrc setf sh "set syntax for *tmux.conf to sh (bash) + au BufNewFile,BufRead cjdroute.conf setf javascript "set syntax for *cjdroute.conf to javascript + au BufNewFile,BufRead ircd.conf setf javascript "set syntax for *ircd.conf to javascript +"}}} -"==========" -" General: " -"==========" -set cursorline cursorcolumn "enable row/column highlighting -set splitright "add new tiles on the right (and not left) when added -set scrolloff=5 sidescrolloff=5 "how many vertical and horizontal characters left before scrolling -set number "enable line numbers -set list listchars=tab:>-,trail:- "display whitespace -set nowrap "disable line wrapping -set autochdir "current dir is file dir -set backspace=indent,eol,start "enables backspacing -set history=60 "undo history -set mouse=a "enables mouse -set whichwrap=b,s,<,>,[,] "allow the cursor to wrap lines -set clipboard=unnamed "enable copy/paste support between vim and xorg's middle-click style clipboard -set textwidth=0 "the default width text will go before breaking when line breaks are enabled -set nolinebreak "disable linebreaks, though this will be overridden by filetype plugins -set showmatch "show matching open bracket when closed bracket is inserted -set matchtime=5 "the amount of time the matching bracket will highlight -set smarttab expandtab autoindent tabstop=4 shiftwidth=4 "configure tabs -set laststatus=2 showcmd statusline=%F%m%r%h%w[%L][%{&ff}]%y[%p%%][%04l,%04v] "statusline init and config -set hlsearch incsearch ignorecase smartcase "configure search +"GENERAL: ANYTHING THAT DOESN'T FIT ELSEWHERE {{{ + set cursorline cursorcolumn "enable row/column highlighting + set splitright "add new tiles on the right (and not left) when added + set scrolloff=3 sidescrolloff=3 "how many vertical and horizontal characters left before scrolling + set number "enable line numbers + set list listchars=tab:>-,trail:- "display whitespace + set nowrap "disable line wrapping + set autochdir "current dir is file dir + set backspace=indent,eol,start "enables backspacing + set history=75 "undo history + set mouse=a "enables mouse + set whichwrap=b,s,<,>,[,] "allow the cursor to wrap lines + set clipboard=unnamed "enable copy/paste support between vim and xorg's middle-click style clipboard + set textwidth=0 "the default width text will go before breaking when line breaks are enabled + set nolinebreak "disable linebreaks, though this will be overridden by filetype plugins + set showmatch "show matching open bracket when closed bracket is inserted + set matchtime=5 "the amount of time the matching bracket will highlight + set smarttab expandtab autoindent tabstop=4 shiftwidth=4 "configure tabs + set laststatus=2 showcmd statusline=%F%m%r%h%w[%L][%{&ff}]%y[%p%%][%04l,%04v] "statusline init and config + set hlsearch incsearch ignorecase smartcase "configure search -"load the system version of matchit if another hasn't already been -if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# '' - runtime! macros/matchit.vim -endif + "load the system version of matchit if another hasn't already been + if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# '' + runtime! macros/matchit.vim + endif -"enable menu tab completion, configure its behaviour and set configure suffixes to reduce priority for and ignore" -set completeopt=longest,menuone -set wildmenu -set wildmode=list:longest -set wildignore=*.dll,*.o,*.obj,*.bak,*.exe,*.pyc,*.jpg,*.gif,*.png -set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc + "enable menu tab completion, configure its behaviour and set configure suffixes to reduce priority for and ignore" + set completeopt=longest,menuone + set wildmenu + set wildmode=list:longest,full + set wildignore=*.dll,*.o,*.obj,*.bak,*.exe,*.pyc,*.jpg,*.gif,*.png + set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc +"}}} -"==================" -" GVim GUI Config: " -"==================" -set guioptions-=T "remove the toolbar +"GVIM: GUI CONFIG OPTIONS {{{ + set guioptions-=T "remove the toolbar -if &wrap - set go-=b "disable the bottom scrollbar iff text wrapping is enabled -else - set go+=b "enable the bottom scrollbar iff text wrapping is disabled -endif + if &wrap + set go-=b "disable the bottom scrollbar iff text wrapping is enabled + else + set go+=b "enable the bottom scrollbar iff text wrapping is disabled + endif +"}}}