From 72dfdfd7dbfb476f636a2187a947f7966e59bdd4 Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 24 Mar 2014 20:36:36 -0400 Subject: [PATCH] changed the clipboard to 'unnamedplus' which cuts/copies to the xorg clipboard and the desktop one, and pastes from the desktop. I also tweaked the theme to include more variety, make things more readable and apply more logic as to what has what colour/style. F2-F4 are now the line number and highlight toggles, ` and ~ are now toggles for nerdtree/ctags, visual highlighted text is now replaced with p rather than needing to use P, ctrl-t,n,p open new tabs and cycle to the next and previous one respectively, and each ctrl/shift-up/down/left/right combo now has a h,j,k,l equivalent with more complete movement. The autocomplete list no longer has a limit, and folded code is now collapsed at a lower depth. --- vim/colors/darkcloud.vim | 46 ++++++++++---------- vim/config/keyboard.vim | 94 ++++++++++++++++++++++------------------ vim/config/plugins.vim | 1 - vim/config/settings.vim | 4 +- 4 files changed, 77 insertions(+), 68 deletions(-) diff --git a/vim/colors/darkcloud.vim b/vim/colors/darkcloud.vim index 55816bc..b680263 100644 --- a/vim/colors/darkcloud.vim +++ b/vim/colors/darkcloud.vim @@ -273,13 +273,14 @@ endif "Default foreground and background call s:X("Normal","bcbcbc","262626","","White",s:termBlack) -call s:X("Pmenu","87d7ff","303030","","Grey","LightBlue") +call s:X("Pmenu","87d7ff","303030","","Grey","Blue") call s:X("PmenuSel","87d7ff","4e4e4e","bold","White","Black") -call s:X("CursorLine","","303030","","",s:termBlack) -call s:X("CursorLineNr","000000","87d7ff","bold",s:termBlack,"Blue") -call s:X("CursorColumn","","303030","","",s:termBlack) call s:X("MatchParen","000000","87d7ff","bold",s:termBlack,"Blue") +call s:X("CursorColumn","","303030","","",s:termBlack) +call s:X("CursorLine","","303030","","",s:termBlack) +call s:X("CursorLineNr","87d7ff","","bold","Blue",s:termBlack) +call s:X("LineNr","ffaf00","","","Red",s:termBlack) call s:X("TabLine","","000000","","",s:termBlack) call s:X("TabLineFill","","000000","","",s:termBlack) @@ -288,7 +289,6 @@ call s:X("TabLineSel","000000","ffffff","",s:termBlack,"White") call s:X("Visual","","000000","standout","",s:termBlack) call s:X("Cursor","000000","87d7ff","underline",s:termBlack,"Blue") -call s:X("LineNr","ffaf00","","","Red","") call s:X("Comment","626262","","","Grey","") call s:X("Todo","5f0000","808080","","Red",s:termBlack) @@ -297,19 +297,19 @@ call s:X("StatusLineNC","ffffff","626262","","White","Grey") call s:X("VertSplit","626262","626262","",s:termBlack,s:termBlack) call s:X("WildMenu","808080","303030","","White",s:termBlack) -call s:X("Folded","ffaf00","262626","standout","Red",s:termBlack) -call s:X("FoldColumn","ffaf00","262626","bold","Red",s:termBlack) -call s:X("SignColumn","","000000","","",s:termBlack) -call s:X("ColorColumn","","000000","","",s:termBlack) +call s:X("Folded","ffaf00","626262","bold","Red",s:termBlack) +call s:X("FoldColumn","ffaf00","626262","bold","Red",s:termBlack) +call s:X("SignColumn","ffaf00","626262","bold","Red",s:termBlack) +call s:X("ColorColumn","ffaf00","626262","bold","Red",s:termBlack) -call s:X("Title","d75f5f","","bold","Red","") -call s:X("Constant","ffaf00","","","Yellow","") +call s:X("Title","d75f5f","","underline","Red","") +call s:X("Constant","d75f5f","","bold","Red","") call s:X("Special","ffaf00","","","Yellow","") call s:X("Delimiter","ffaf00","","","Yellow","") -call s:X("String","ffffff","","","White","") +call s:X("String","ffffff","","italic","White","") call s:X("StringDelimiter","ffff00","","","Yellow","") call s:X("Identifier","87d7ff","","","Blue","") -call s:X("Structure","d75f5f","","","Red","") +call s:X("Structure","ffffff","","bold","White","") call s:X("Function","87d7ff","","","Blue","") call s:X("Statement","ffd787","","","Yellow","") call s:X("PreProc","ffd787","","","Yellow","") @@ -320,25 +320,25 @@ call s:X("SpecialKey","000000","","",s:termBlack,"") call s:X("Search","ffffff","d75f5f","bold","White","Red") call s:X("IncSearch","87d7ff","626262","standout","Blue","Grey") call s:X("Directory","ffff00","","","Yellow","") -call s:X("Question","ffaf00","","","","") +call s:X("Question","d75f5f","","","Red","") call s:X("ExtraWhitespace","262626","","standout",s:termBlack,"") -call s:X("ErrorMsg","5f0000","ffaf00","bold","DarkRed","Yellow") +call s:X("ErrorMsg","d75f5f","000000","standout","Red",s:termBlack) hi! link Error ErrorMsg hi! link MoreMsg Special "spell checking -call s:X("SpellBad","bcbcbc","262626","undercurl","White",s:termBlack) -call s:X("SpellCap","bcbcbc","262626","undercurl","White",s:termBlack) -call s:X("SpellRare","bcbcbc","262626","undercurl","White",s:termBlack) -call s:X("SpellLocal","bcbcbc","262626","undercurl","White",s:termBlack) +call s:X("SpellBad","ff0000","","undercurl","Red","") +call s:X("SpellCap","ffd787","","undercurl","","") +call s:X("SpellLocal","ffd787","","undercurl","","") +"call s:X("SpellRare","","","","","") "diff hi! link diffRemoved Constant hi! link diffAdded String -call s:X("DiffAdd","000000","00ff00","",s:termBlack,"Green") -call s:X("DiffDelete","000000","d75f5f","",s:termBlack,"Red") -call s:X("DiffChange","000000","87d7ff","",s:termBlack,"Blue") -call s:X("DiffText","000000","626262","bold",s:termBlack,"White") +call s:X("DiffAdd","000000","ffd787","italic",s:termBlack,"Yellow") +call s:X("DiffDelete","000000","d75f5f","italic",s:termBlack,"Red") +call s:X("DiffChange","000000","87d7ff","italic",s:termBlack,"Blue") +call s:X("DiffText","000000","c6c6c6","italic",s:termBlack,"White") "php hi! link phpFunctions Function diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index e522cc6..941f738 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -14,32 +14,38 @@ " | (A) -> scroll right " | (A) -> scroll left " | (A) -> unbind this from vim so xorg can paste -" | (A) -> go to the next open tab -"

| (A) -> go to the previous open tab +" | (A) -> open a new tab +" | (A) -> go to the next open tab +" | (A) -> go to the previous open tab " | (V) -> indent a block in visual mode " | (V) -> unindent a block in visual mod -" | (N) -> toggle the nerdtree sidebar -" | (N) -> toggle the tagbar sidebar -" | (A) -> toggle row/column highlighting -" | (A) -> toggle line numbers -" | (N) -> toggle line wrapping -" | (A) -> toggle visible trailing whitespace -" | (A) -> toggle collapsed/folded rows -" | (V) -> paste and replace the selection +" ` | (N) -> toggle the nerdtree sidebar +" ~ | (N) -> toggle the tagbar sidebar +" p | (V) -> paste and replace the selection " | (N) -> paste and replace the current word +" | (A) -> toggle line numbers +" | (N) -> toggle line wrapping +" | (A) -> toggle row/column highlighting +" | (A) -> toggle collapsed/folded rows " | (N) -> format document and return to current line " | (N) -> remove whitespace " | (N) -> move to the beginning of the document +" | (N) -> move to the beginning of the document " | (N) -> move to the end of the document +" | (N) -> move to the end of the document " | (N) -> move to the end of the line +" | (N) -> move to the end of the line " | (N) -> move to the beginning of the non-whitespace -" | (N) -> move to the beginning of the line +" | (N) -> move to the beginning of the line " | (N) -> select all " | (N) -> select all text above the cursor +" | (N) -> select all text above the cursor " | (N) -> select all text below the cursor +" | (N) -> select all text below the cursor " | (N) -> select all text to the right of the cursor +" | (N) -> select all text to the right of the cursor " | (N) -> select to the beginning of the non-whitespace -" | (N) -> select to the beginning of the line +" | (N) -> select to the beginning of the line " " (neocomplcache) " | (I) -> write the part common to all suggestions @@ -73,24 +79,26 @@ vnoremap n ':tabn' - nnoremap p ':tabp' + nnoremap ':tabnew' + nnoremap ':tabnext' + nnoremap ':tabprev' - "toggle the cursor line and column - nnoremap ':set cursorline! cursorcolumn!' + "map shift-p to paste over a word, and visual paste to replace selection + vnoremap p "_d"0P + nnoremap "_diwP "toggle the display of line numbers - nnoremap ':set number!' + nnoremap ':set number!' "toggle line wrapping (and bottom bar if using the gui) if !has("gui_running") - nnoremap ':set wrap!' + nnoremap ':set wrap!' else - nnoremap ':set wrap! go'.'-+'[&wrap]."=b\r" + nnoremap ':set wrap! go'.'-+'[&wrap]."=b\r" endif - "toggle the display of whitespace - nnoremap ':set list!' + "toggle the cursor line and column + nnoremap ':set cursorline! cursorcolumn!' "toggle folded code at foldpoints inoremap za @@ -98,43 +106,45 @@ onoremap za vnoremap zf - "map shift-p to paste and replace the current word or selection - vnoremap "_d"0P - nnoremap "_diwP - - "format document then return to current line + "format the document nnoremap mzgg=G`z - "remove trailing white space - nnoremap ':FixWhitespace' + "remove trailing white space from the document + nnoremap ':FixWhitespace' "remap keys to scroll through text - nnoremap gg0 - nnoremap G$ + nnoremap gg + nnoremap gg0 + nnoremap G + nnoremap G$ nnoremap $ + nnoremap $ nnoremap ^ - nnoremap 0 + nnoremap 0 "map remap keys to select text nnoremap ggvG - nnoremap vgg0 - nnoremap vG$ + nnoremap vgg + nnoremap vgg0 + nnoremap vG + nnoremap vG$ nnoremap v$ + nnoremap v$ nnoremap v^ - nnoremap v0 + nnoremap v0 "}}} "PLUGIN KEYBINDINGS {{{ "toggle the nerd tree sidebar - nnoremap ':NERDTree' + nnoremap ` ':NERDTree' "toggle the tagbar sidebar - nnoremap ':TagbarToggle' + 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() + inoremap pumvisible() ? neocomplcache#complete_common_string() : "\" + inoremap pumvisible() ? neocomplcache#close_popup() : "\" + inoremap neocomplcache#undo_completion() "emmet switch triggerkey from to let g:user_emmet_leader_key='' @@ -151,9 +161,9 @@ "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" + 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: COMMAND SHORTCUTS {{{ diff --git a/vim/config/plugins.vim b/vim/config/plugins.vim index feb4f95..b162621 100644 --- a/vim/config/plugins.vim +++ b/vim/config/plugins.vim @@ -15,7 +15,6 @@ 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 diff --git a/vim/config/settings.vim b/vim/config/settings.vim index 596aa2c..588e4dd 100644 --- a/vim/config/settings.vim +++ b/vim/config/settings.vim @@ -18,7 +18,7 @@ "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 + set foldmethod=syntax foldcolumn=1 foldlevel=3 "configure how folding code works set formatoptions=roqnl12 "configure format options "}}} @@ -45,7 +45,7 @@ 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 clipboard=unnamedplus "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