From 825cc37eaac153e1d345c8a011b1a7b60565cea2 Mon Sep 17 00:00:00 2001 From: Kevin Date: Wed, 9 Apr 2014 13:04:34 -0400 Subject: [PATCH] Added better syntax highlighting, aliased launchers and a ctrl-f7 toggle for extradite, improved some of the custom filetype key handling, including extradite, and added line numbering to extradite. --- vim/colors/darkcloud.vim | 3 +- vim/config/keyboard.vim | 262 ++++++++++++++++++++++----------------- vim/config/plugins.vim | 1 - vim/config/settings.vim | 1 + 4 files changed, 150 insertions(+), 117 deletions(-) diff --git a/vim/colors/darkcloud.vim b/vim/colors/darkcloud.vim index 9564d61..d7fc882 100644 --- a/vim/colors/darkcloud.vim +++ b/vim/colors/darkcloud.vim @@ -298,7 +298,7 @@ call s:X("LineNr","#4e4e4e","","bold","White",s:termBlack) hi LineNr ctermfg=239 call s:X("Visual","","#262626","standout","",s:termBlack) -call s:X("MatchParen","#ffffff","","bold,underline","","") +call s:X("MatchParen","","#303030","bold,underline","","") "whitespace call s:X("TabLine","","#000000","","",s:termBlack) @@ -370,6 +370,7 @@ hi! link SignifyLineAdd DiffAdd hi! link SignifyLineDelete DiffDelete hi! link SignifyLineChange DiffChange hi! link gitconfigAssignment Label +hi! link ExtraditeLogName Type "html call s:X("htmlTitle","#ffffff","","underline,bold","White","") diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index 9f28a02..48457f8 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -12,6 +12,11 @@ " Note: " *The default key is: \ " +" Aliases: +" :GitLog & :gitlog | (C) -> show a navigatable log of commit history +" :wsudo & :sudow | (C) -> write the file as root using sudo +" :esudo & :sudoe | (C) -> read a file as root using sudo +" " Reference: (view plugin documentation for the full list of commands each offers) " (tcomment _ can also be -) " | (A) -> comment selection/create an empty comment @@ -65,7 +70,7 @@ " | (A) -> toggle spell check " | (A) -> toggle syntax checking " | (A) -> toggle version control differences -" | (A) -> toggle version control difference line highlight +" | (A) -> toggle version control commit history " | (A) -> toggle the tagbar sidebar " | (A) -> toggle the location list to check syntax errors " | (A) -> toggle the gundo undo history sidebar @@ -163,47 +168,6 @@ " dd | (N) -> delete lines under and after the one below " " Filetype Specific Mappings: -" (vimdiff) -" <> | (N) -> update differences -" >< | (N) -> update differences -" > | (N) -> replace diff in other pane with current pane -" replace diff in current pane with other pane -" -" (help) -" q | (N) -> close the dialog -" -" (markdown) -" | (A) -> show heading TOC instead of the taglist -" -" (markdown toc) -" | (A) -> select heading but remain in toc -" | (A) -> select heading to edit -" | (A) -> up -" | (A) -> down -" h | (A) -> j -" l | (A) -> k -" -" (vimfiler) -" | (N) -> edit selected file -" | (N) -> map to l, which opens a directory -" | (N) -> map to h, which goes up one directory -" ' | (N) -> edit the selected file -" n | (N) -> start editing a new file -" -" (markdown toc + vimfiler) -" | (N) -> left click + left justify the cursor -" | (N) -> same as the left click -" | (N) -> same as the left click -" -" (gundo) -" | (N) -> same as normal + justify on the left -" | (N) -> same as the left mouse -" | (N) -> same as the left mouse -" | (N) -> same as down -" l | (N) -> same as j -" | (N) -> same as Up -" h | (N) -> same as k -" " (breeze->html compat) " _ | (N) -> move to the next sibling tag " + | (N) -> move to the previous sibling tag @@ -213,10 +177,69 @@ " + | (N) -> move to the last child tag " | (N) -> move to the parent tag " -" Aliases: -" :wsudo -and- :sudow | (C) -> :SudoWrite (write the file as root using sudo) -" :esudo -and- :sudoe | (C) -> :SudoRead (read a file as root using sudo) +" (extradite) +" | (A) -> close the dialog +" | (A) -> same as down +" l | (A) -> same as j +" | (A) -> same as Up +" h | (A) -> same as k " +" (gundo) +" | (A) -> same as normal + justify on the left +" | (A) -> same as the left mouse +" | (A) -> same as the left mouse +" | (A) -> same as down +" l | (A) -> same as j +" | (A) -> same as Up +" h | (A) -> same as k +" +" (help) +" q | (A) -> close the dialog +" ?? | (A) -> close the dialog +" ?> | (A) -> close the dialog +" ?< | (A) -> close the dialog +" +" (markdown) +" | (A) -> show heading TOC instead of the taglist +" +" (markdown toc) +" | (A) -> left click + left justify the cursor +" | (A) -> same as the left click +" | (A) -> same as the left click +" | (A) -> select heading to edit +" | (A) -> close the dialog +" q | (A) -> close the dialog +" | (A) -> select heading but remain in toc +" | (A) -> up +" | (A) -> down +" h | (A) -> j +" l | (A) -> k +" +" (vimdiff) +" <> | (N) -> update differences +" >< | (N) -> update differences +" > | (N) -> replace diff in other pane with current pane +" replace diff in current pane with other pane +" +" (vimfiler) +" | (A) -> left click + left justify the cursor +" | (A) -> same as the left click +" | (A) -> same as the left click +" | (A) -> edit selected file +" | (A) -> map to l, which opens a directory +" | (A) -> map to h, which goes up one directory +" ' | (A) -> edit the selected file +" n | (A) -> start editing a new file +" + +"ALIASES: COMMAND SHORTCUTS {{{ + cabbrev GitLog ':Extradite:wincmd x:wincmd j:resize 10' + cabbrev gitlog ':Extradite:wincmd x:wincmd j:resize 10' + cabbrev sudow SudoWrite + cabbrev wsudo SudoWrite + cabbrev sudoe SudoRead + cabbrev esudo SudoRead +"}}} "MAPPINGS: GENERAL KEYBINDINGS AND REBINDINGS {{{ "MOUSE:{ @@ -299,9 +322,9 @@ "toggle signify and signify highlight let g:signify_mapping_toggle = '' - nnoremap ':SignifyToggleHighlight:echo "toggled version control differences line highlight"' - xnoremap ':SignifyToggleHighlightv' - inoremap ':SignifyToggleHighlight' + nnoremap ':Extradite:wincmd x:wincmd j:resize 10' + xnoremap ':Extradite:wincmd x:wincmd j:resize 10' + inoremap ':Extradite:wincmd x:wincmd j:resize 10' "bindings to trigger the tagbar list of tags nnoremap ':TagbarToggle:echo "code tagbar toggled"' @@ -462,53 +485,6 @@ "}}} "FILETYPE SPECIFIC MAPPINGS: {{{ - "vimdiff - autocmd FilterWritePre * if &diff|nnoremap <> ':diffu'|endif - autocmd FilterWritePre * if &diff|nnoremap >< ':diffu'|endif - autocmd FilterWritePre * if &diff|nnoremap > dp|endif - autocmd FilterWritePre * if &diff|nnoremap < do|endif - autocmd FilterWritePre * if &diff|cabbrev q qall|endif - autocmd FilterWritePre * if &diff|cabbrev q! qall!|endif - - "help - autocmd FileType help nnoremap q ':q' - autocmd FileType help nnoremap ?? ':q' - autocmd FileType help nnoremap ?> ':q' - autocmd FileType help nnoremap ?< ':q' - - "markdown launch table of contents instead of the tagbar - autocmd FileType mkd noremap ':Toch' - - "markdown table of contents - autocmd FileType qf noremap ':q' - autocmd FileType qf noremap p - autocmd FileType qf noremap <2-LeftMouse> - autocmd FileType qf noremap - autocmd FileType qf noremap - autocmd FileType qf noremap h j - autocmd FileType qf noremap l k - - "vimfiler - autocmd FileType vimfiler nmap <2-LeftMouse> (vimfiler_edit_file) - autocmd FileType vimfiler nmap l - autocmd FileType vimfiler nmap h - autocmd FileType vimfiler nmap ' e - autocmd FileType vimfiler nmap n q - - "markdown toc and vimfiler - autocmd FileType qf,vimfiler nmap 0 - autocmd FileType qf,vimfiler nmap - autocmd FileType qf,vimfiler nmap - - "gundo - autocmd FileType gundo nmap 0l - autocmd FileType gundo nmap - autocmd FileType gundo nmap - autocmd FileType gundo nmap - autocmd FileType gundo nmap l j - autocmd FileType gundo nmap - autocmd FileType gundo nmap h k - "breeze compatible formats autocmd BufNewFile,BufRead *.html,*.htm,*.xhtml,*.xml,*.php,*.aspx nmap _ ':BreezePrevSibling' autocmd BufNewFile,BufRead *.html,*.htm,*.xhtml,*.xml,*.php,*.aspx nmap + ':BreezeNextSibling' @@ -517,35 +493,91 @@ autocmd BufNewFile,BufRead *.html,*.htm,*.xhtml,*.xml,*.php,*.aspx nmap _ ':BreezeFirstChild' autocmd BufNewFile,BufRead *.html,*.htm,*.xhtml,*.xml,*.php,*.aspx nmap + ':BreezeLastChild' autocmd BufNewFile,BufRead *.html,*.htm,*.xhtml,*.xml,*.php,*.aspx nmap ':BreezeParent' + + "extradite + autocmd FileType extradite map ':q' + autocmd FileType extradite map + autocmd FileType extradite map l j + autocmd FileType extradite map + autocmd FileType extradite map h k + + "gundo + autocmd FileType gundo map 0l + autocmd FileType gundo map + autocmd FileType gundo map + autocmd FileType gundo map + autocmd FileType gundo map l j + autocmd FileType gundo map + autocmd FileType gundo map h k + + "help + autocmd FileType help map q ':q' + autocmd FileType help map ?? ':q' + autocmd FileType help map ?> ':q' + autocmd FileType help map ?< ':q' + + "markdown: launch table of contents instead of the tagbar + autocmd FileType mkd map ':Toch' + + "markdown table of contents + autocmd FileType qf map 0 + autocmd FileType qf map + autocmd FileType qf map + autocmd FileType qf map <2-LeftMouse> + autocmd FileType qf map ':q' + autocmd FileType qf map q ':q' + autocmd FileType qf map p + autocmd FileType qf map + autocmd FileType qf map + autocmd FileType qf map h j + autocmd FileType qf map l k + + "vimdiff + autocmd FilterWritePre * if &diff|nnoremap <> ':diffu'|endif + autocmd FilterWritePre * if &diff|nnoremap >< ':diffu'|endif + autocmd FilterWritePre * if &diff|nnoremap > dp|endif + autocmd FilterWritePre * if &diff|nnoremap < do|endif + autocmd FilterWritePre * if &diff|cabbrev q qall|endif + autocmd FilterWritePre * if &diff|cabbrev q! qall!|endif + + "vimfiler + autocmd FileType vimfiler map 0 + autocmd FileType vimfiler map + autocmd FileType vimfiler map + autocmd FileType vimfiler map <2-LeftMouse> (vimfiler_edit_file) + autocmd FileType vimfiler map l + autocmd FileType vimfiler map h + autocmd FileType vimfiler map ' e + autocmd FileType vimfiler map n q "}}} "DISABLED MAPPINGS: {{{ - "remove incompatible toggles from specific filetypes - autocmd Filetype qf,gundo,vimfiler noremap - autocmd Filetype qf,ggundo,vimfiler,tagbar,help noremap - autocmd Filetype qf,ggundo,vimfiler,tagbar noremap - autocmd Filetype qf,ggundo,vimfiler,tagbar,help noremap + "remove incompatible toggles from specific file types + autocmd Filetype qf,gundo,vimfiler,extradite noremap + autocmd Filetype qf,ggundo,vimfiler,extradite,tagbar,help noremap + autocmd Filetype qf,ggundo,vimfiler,extradite,tagbar noremap + autocmd Filetype qf,ggundo,vimfiler,extradite,tagbar,help noremap + autocmd Filetype qf,ggundo,vimfiler,extradite,tagbar,help noremap + autocmd Filetype qf,ggundo,vimfiler,extradite,tagbar,help noremap + autocmd Filetype qf,ggundo,vimfiler,extradite,tagbar,help noremap + autocmd Filetype qf,ggundo,vimfiler,extradite,tagbar,help noremap + autocmd Filetype qf,ggundo,vimfiler,extradite,tagbar,help noremap + autocmd Filetype qf,ggundo,vimfiler,extradite,tagbar,help noremap + autocmd Filetype qf,ggundo,vimfiler,extradite,tagbar,help noremap autocmd Filetype qf,ggundo,vimfiler noremap autocmd Filetype qf,ggundo,vimfiler noremap autocmd Filetype qf,ggundo,vimfiler noremap autocmd Filetype qf,ggundo,vimfiler noremap - autocmd Filetype qf,ggundo,vimfiler noremap - autocmd Filetype qf,ggundo,vimfiler noremap - autocmd Filetype qf,ggundo,vimfiler noremap - autocmd Filetype qf,ggundo,vimfiler noremap + autocmd Filetype qf,ggundo,vimfiler,extradite noremap + autocmd Filetype qf,ggundo,vimfiler,extradite noremap + autocmd Filetype qf,ggundo,vimfiler,extradite noremap + autocmd Filetype qf,ggundo,vimfiler,extradite noremap autocmd Filetype qf,ggundo,vimfiler noremap autocmd Filetype qf,ggundo,vimfiler noremap autocmd Filetype qf,ggundo,vimfiler noremap autocmd Filetype qf,ggundo,vimfiler noremap - autocmd Filetype qf,ggundo,vimfiler noremap - autocmd Filetype qf,ggundo,vimfiler noremap - autocmd Filetype qf,ggundo,vimfiler noremap - autocmd Filetype qf,ggundo,vimfiler noremap -"}}} - -"ALIASES: COMMAND SHORTCUTS {{{ - cabbrev sudow SudoWrite - cabbrev wsudo SudoWrite - cabbrev sudoe SudoRead - cabbrev esudo SudoRead + autocmd Filetype qf,ggundo,vimfiler,extradite noremap + autocmd Filetype qf,ggundo,vimfiler,extradite noremap + autocmd Filetype qf,ggundo,vimfiler,extradite noremap + autocmd Filetype qf,ggundo,vimfiler,extradite noremap "}}} diff --git a/vim/config/plugins.vim b/vim/config/plugins.vim index 681f4f5..7e36d93 100644 --- a/vim/config/plugins.vim +++ b/vim/config/plugins.vim @@ -281,4 +281,3 @@ \ } endif "}}} - diff --git a/vim/config/settings.vim b/vim/config/settings.vim index 89c9e95..144e1f6 100644 --- a/vim/config/settings.vim +++ b/vim/config/settings.vim @@ -84,6 +84,7 @@ autocmd FileType help* vertical resize 80 "set the window size to 80 cols autocmd FileType help* setlocal nocursorline "remove the horizontal cursor line autocmd BufEnter,FileType qf,help* setlocal nowrap nocursorcolumn "disable text wrapping and the vertical cursor line + autocmd BufEnter,FileType extradite setlocal number "settings for buffers in diff mode autocmd VimEnter,FilterWritePre * if &diff|setlocal nofoldenable|endif