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.

This commit is contained in:
Kevin 2014-03-24 20:36:36 -04:00
parent f2de4c3a33
commit 72dfdfd7db
4 changed files with 77 additions and 68 deletions

View file

@ -273,13 +273,14 @@ endif
"Default foreground and background "Default foreground and background
call s:X("Normal","bcbcbc","262626","","White",s:termBlack) 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("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("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("TabLine","","000000","","",s:termBlack)
call s:X("TabLineFill","","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("Visual","","000000","standout","",s:termBlack)
call s:X("Cursor","000000","87d7ff","underline",s:termBlack,"Blue") 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("Comment","626262","","","Grey","")
call s:X("Todo","5f0000","808080","","Red",s:termBlack) 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("VertSplit","626262","626262","",s:termBlack,s:termBlack)
call s:X("WildMenu","808080","303030","","White",s:termBlack) call s:X("WildMenu","808080","303030","","White",s:termBlack)
call s:X("Folded","ffaf00","262626","standout","Red",s:termBlack) call s:X("Folded","ffaf00","626262","bold","Red",s:termBlack)
call s:X("FoldColumn","ffaf00","262626","bold","Red",s:termBlack) call s:X("FoldColumn","ffaf00","626262","bold","Red",s:termBlack)
call s:X("SignColumn","","000000","","",s:termBlack) call s:X("SignColumn","ffaf00","626262","bold","Red",s:termBlack)
call s:X("ColorColumn","","000000","","",s:termBlack) call s:X("ColorColumn","ffaf00","626262","bold","Red",s:termBlack)
call s:X("Title","d75f5f","","bold","Red","") call s:X("Title","d75f5f","","underline","Red","")
call s:X("Constant","ffaf00","","","Yellow","") call s:X("Constant","d75f5f","","bold","Red","")
call s:X("Special","ffaf00","","","Yellow","") call s:X("Special","ffaf00","","","Yellow","")
call s:X("Delimiter","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("StringDelimiter","ffff00","","","Yellow","")
call s:X("Identifier","87d7ff","","","Blue","") 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("Function","87d7ff","","","Blue","")
call s:X("Statement","ffd787","","","Yellow","") call s:X("Statement","ffd787","","","Yellow","")
call s:X("PreProc","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("Search","ffffff","d75f5f","bold","White","Red")
call s:X("IncSearch","87d7ff","626262","standout","Blue","Grey") call s:X("IncSearch","87d7ff","626262","standout","Blue","Grey")
call s:X("Directory","ffff00","","","Yellow","") 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("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 Error ErrorMsg
hi! link MoreMsg Special hi! link MoreMsg Special
"spell checking "spell checking
call s:X("SpellBad","bcbcbc","262626","undercurl","White",s:termBlack) call s:X("SpellBad","ff0000","","undercurl","Red","")
call s:X("SpellCap","bcbcbc","262626","undercurl","White",s:termBlack) call s:X("SpellCap","ffd787","","undercurl","","")
call s:X("SpellRare","bcbcbc","262626","undercurl","White",s:termBlack) call s:X("SpellLocal","ffd787","","undercurl","","")
call s:X("SpellLocal","bcbcbc","262626","undercurl","White",s:termBlack) "call s:X("SpellRare","","","","","")
"diff "diff
hi! link diffRemoved Constant hi! link diffRemoved Constant
hi! link diffAdded String hi! link diffAdded String
call s:X("DiffAdd","000000","00ff00","",s:termBlack,"Green") call s:X("DiffAdd","000000","ffd787","italic",s:termBlack,"Yellow")
call s:X("DiffDelete","000000","d75f5f","",s:termBlack,"Red") call s:X("DiffDelete","000000","d75f5f","italic",s:termBlack,"Red")
call s:X("DiffChange","000000","87d7ff","",s:termBlack,"Blue") call s:X("DiffChange","000000","87d7ff","italic",s:termBlack,"Blue")
call s:X("DiffText","000000","626262","bold",s:termBlack,"White") call s:X("DiffText","000000","c6c6c6","italic",s:termBlack,"White")
"php "php
hi! link phpFunctions Function hi! link phpFunctions Function

View file

@ -14,32 +14,38 @@
" <Ctrl-ScrollUp> | (A) -> scroll right " <Ctrl-ScrollUp> | (A) -> scroll right
" <Ctrl-ScrollDown> | (A) -> scroll left " <Ctrl-ScrollDown> | (A) -> scroll left
" <Shift-MiddleClick> | (A) -> unbind this from vim so xorg can paste " <Shift-MiddleClick> | (A) -> unbind this from vim so xorg can paste
" <Leader><n> | (A) -> go to the next open tab " <Ctrl-t> | (A) -> open a new tab
" <Leader><p> | (A) -> go to the previous open tab " <Ctrl-n> | (A) -> go to the next open tab
" <Ctrl-p> | (A) -> go to the previous open tab
" <Tab> | (V) -> indent a block in visual mode " <Tab> | (V) -> indent a block in visual mode
" <Shift-Tab> | (V) -> unindent a block in visual mod " <Shift-Tab> | (V) -> unindent a block in visual mod
" <F1> | (N) -> toggle the nerdtree sidebar " ` | (N) -> toggle the nerdtree sidebar
" <F2> | (N) -> toggle the tagbar sidebar " ~ | (N) -> toggle the tagbar sidebar
" <F3> | (A) -> toggle row/column highlighting " p | (V) -> paste and replace the selection
" <F4> | (A) -> toggle line numbers
" <F5> | (N) -> toggle line wrapping
" <F6> | (A) -> toggle visible trailing whitespace
" <F12> | (A) -> toggle collapsed/folded rows
" <Shift-p> | (V) -> paste and replace the selection
" <Shift-p> | (N) -> paste and replace the current word " <Shift-p> | (N) -> paste and replace the current word
" <F2> | (A) -> toggle line numbers
" <F3> | (N) -> toggle line wrapping
" <F4> | (A) -> toggle row/column highlighting
" <F12> | (A) -> toggle collapsed/folded rows
" <Leader><C-f> | (N) -> format document and return to current line " <Leader><C-f> | (N) -> format document and return to current line
" <Leader><C-w> | (N) -> remove whitespace " <Leader><C-w> | (N) -> remove whitespace
" <Ctrl-Up> | (N) -> move to the beginning of the document " <Ctrl-Up> | (N) -> move to the beginning of the document
" <Ctrl-k> | (N) -> move to the beginning of the document
" <Ctrl-Down> | (N) -> move to the end of the document " <Ctrl-Down> | (N) -> move to the end of the document
" <Ctrl-j> | (N) -> move to the end of the document
" <Ctrl-Right> | (N) -> move to the end of the line " <Ctrl-Right> | (N) -> move to the end of the line
" <Ctrl-l> | (N) -> move to the end of the line
" <Ctrl-Left> | (N) -> move to the beginning of the non-whitespace " <Ctrl-Left> | (N) -> move to the beginning of the non-whitespace
" <Ctrl-\> | (N) -> move to the beginning of the line " <Ctrl-h> | (N) -> move to the beginning of the line
" <Ctrl-a> | (N) -> select all " <Ctrl-a> | (N) -> select all
" <Shift-Up> | (N) -> select all text above the cursor " <Shift-Up> | (N) -> select all text above the cursor
" <Shift-k> | (N) -> select all text above the cursor
" <Shift-Down> | (N) -> select all text below the cursor " <Shift-Down> | (N) -> select all text below the cursor
" <Shift-j> | (N) -> select all text below the cursor
" <Shift-Right> | (N) -> select all text to the right of the cursor " <Shift-Right> | (N) -> select all text to the right of the cursor
" <Shift-l> | (N) -> select all text to the right of the cursor
" <Shift-Left> | (N) -> select to the beginning of the non-whitespace " <Shift-Left> | (N) -> select to the beginning of the non-whitespace
" <Shift-\> | (N) -> select to the beginning of the line " <Shift-h> | (N) -> select to the beginning of the line
" "
" (neocomplcache) " (neocomplcache)
" <Tab> | (I) -> write the part common to all suggestions " <Tab> | (I) -> write the part common to all suggestions
@ -73,24 +79,26 @@
vnoremap <S-Tab> <gv vnoremap <S-Tab> <gv
"move to the next and previous tabs "move to the next and previous tabs
nnoremap <Silent><Expr> <Leader>n ':tabn<CR>' nnoremap <silent><expr> <C-t> ':tabnew<CR>'
nnoremap <Silent><Expr> <Leader>p ':tabp<CR>' nnoremap <silent><expr> <C-n> ':tabnext<CR>'
nnoremap <silent><expr> <C-p> ':tabprev<CR>'
"toggle the cursor line and column "map shift-p to paste over a word, and visual paste to replace selection
nnoremap <Silent><Expr> <F3> ':set cursorline! cursorcolumn!<CR>' vnoremap p "_d"0P
nnoremap <S-p> "_diwP
"toggle the display of line numbers "toggle the display of line numbers
nnoremap <Silent><Expr> <F4> ':set number!<CR>' nnoremap <silent><expr> <F2> ':set number!<CR>'
"toggle line wrapping (and bottom bar if using the gui) "toggle line wrapping (and bottom bar if using the gui)
if !has("gui_running") if !has("gui_running")
nnoremap <Silent><Expr> <F5> ':set wrap!<CR>' nnoremap <silent><expr> <F3> ':set wrap!<CR>'
else else
nnoremap <Silent><Expr> <F5> ':set wrap! go'.'-+'[&wrap]."=b\r" nnoremap <silent><expr> <F3> ':set wrap! go'.'-+'[&wrap]."=b\r"
endif endif
"toggle the display of whitespace "toggle the cursor line and column
nnoremap <Silent><Expr> <F6> ':set list!<CR>' nnoremap <silent><expr> <F4> ':set cursorline! cursorcolumn!<CR>'
"toggle folded code at foldpoints "toggle folded code at foldpoints
inoremap <F12> <C-O>za inoremap <F12> <C-O>za
@ -98,43 +106,45 @@
onoremap <F12> <C-C>za onoremap <F12> <C-C>za
vnoremap <F12> zf vnoremap <F12> zf
"map shift-p to paste and replace the current word or selection "format the document
vnoremap <S-p> "_d"0P
nnoremap <S-p> "_diwP
"format document then return to current line
nnoremap <Leader><C-f> mzgg=G`z<CR> nnoremap <Leader><C-f> mzgg=G`z<CR>
"remove trailing white space "remove trailing white space from the document
nnoremap <Silent><Expr> <Leader><C-w> ':FixWhitespace<CR>' nnoremap <silent><expr> <Leader><C-w> ':FixWhitespace<CR>'
"remap keys to scroll through text "remap keys to scroll through text
nnoremap <C-Up> gg0 nnoremap <C-Up> gg
nnoremap <C-Down> G$ nnoremap <C-k> gg0
nnoremap <C-Down> G
nnoremap <C-j> G$
nnoremap <C-Right> $ nnoremap <C-Right> $
nnoremap <C-l> $
nnoremap <C-Left> ^ nnoremap <C-Left> ^
nnoremap <C-\> 0 nnoremap <C-h> 0
"map remap keys to select text "map remap keys to select text
nnoremap <C-a> ggvG nnoremap <C-a> ggvG
nnoremap <S-Up> vgg0 nnoremap <S-Up> vgg
nnoremap <S-Down> vG$ nnoremap <S-k> vgg0
nnoremap <S-Down> vG
nnoremap <S-j> vG$
nnoremap <S-Right> v$ nnoremap <S-Right> v$
nnoremap <S-l> v$
nnoremap <S-Left> v^ nnoremap <S-Left> v^
nnoremap <S-\> v0 nnoremap <S-h> v0
"}}} "}}}
"PLUGIN KEYBINDINGS {{{ "PLUGIN KEYBINDINGS {{{
"toggle the nerd tree sidebar "toggle the nerd tree sidebar
nnoremap <Silent><Expr> <F1> ':NERDTree<CR>' nnoremap <silent><expr> ` ':NERDTree<CR>'
"toggle the tagbar sidebar "toggle the tagbar sidebar
nnoremap <Silent><Expr> <F2> ':TagbarToggle<CR>' nnoremap <silent><expr> ~ ':TagbarToggle<CR>'
"neocomplcache suggestions: cancel, autocomplete, scroll up and scroll down "neocomplcache suggestions: cancel, autocomplete, scroll up and scroll down
inoremap <Expr><Tab> pumvisible() ? neocomplcache#complete_common_string() : "\<Tab>" inoremap <expr><Tab> pumvisible() ? neocomplcache#complete_common_string() : "\<Tab>"
inoremap <Expr><Backspace> pumvisible() ? neocomplcache#close_popup() : "\<Backspace>" inoremap <expr><Backspace> pumvisible() ? neocomplcache#close_popup() : "\<Backspace>"
inoremap <Expr><Leader><Backspace> neocomplcache#undo_completion() inoremap <expr><Leader><Backspace> neocomplcache#undo_completion()
"emmet switch triggerkey from <Ctrl-Y> to <Ctrl-Z> "emmet switch triggerkey from <Ctrl-Y> to <Ctrl-Z>
let g:user_emmet_leader_key='<C-Z>' let g:user_emmet_leader_key='<C-Z>'
@ -151,9 +161,9 @@
"GVIM: MAPPINGS FOR GUI ELEMENTS {{{ "GVIM: MAPPINGS FOR GUI ELEMENTS {{{
"map toggles for the menu, toolbar and scrollbar "map toggles for the menu, toolbar and scrollbar
noremap <Silent><Expr> <C-F1> ":if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>" noremap <silent><expr> <C-F1> ":if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>"
noremap <Silent><Expr> <C-F2> ":if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>" noremap <silent><expr> <C-F2> ":if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>"
noremap <Silent><Expr> <C-F3> ":if &go=~#'r'<Bar>set go-=r<Bar>else<Bar>set go+=r<Bar>endif<CR>" noremap <silent><expr> <C-F3> ":if &go=~#'r'<Bar>set go-=r<Bar>else<Bar>set go+=r<Bar>endif<CR>"
"}}} "}}}
"ALIASES: COMMAND SHORTCUTS {{{ "ALIASES: COMMAND SHORTCUTS {{{

View file

@ -15,7 +15,6 @@
let g:neocomplcache_enable_at_startup=1 let g:neocomplcache_enable_at_startup=1
let g:neocomplcache_enable_smart_case=1 let g:neocomplcache_enable_smart_case=1
let g:neocomplcache_min_syntax_length=3 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_insert_char_pre=1
let g:neocomplcache_enable_underbar_completion=1 let g:neocomplcache_enable_underbar_completion=1
let g:neocomplcache_enable_camel_case_completion=1 let g:neocomplcache_enable_camel_case_completion=1

View file

@ -18,7 +18,7 @@
"SYNTAX: INDENTING, HIGHLIGHTING, FOLDING {{{ "SYNTAX: INDENTING, HIGHLIGHTING, FOLDING {{{
filetype plugin indent on filetype plugin indent on
syntax on "turn syntax highlighting 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 set formatoptions=roqnl12 "configure format options
"}}} "}}}
@ -45,7 +45,7 @@
set history=75 "undo history set history=75 "undo history
set mouse=a "enables mouse set mouse=a "enables mouse
set whichwrap=b,s,<,>,[,] "allow the cursor to wrap lines 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 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 nolinebreak "disable linebreaks, though this will be overridden by filetype plugins
set showmatch "show matching open bracket when closed bracket is inserted set showmatch "show matching open bracket when closed bracket is inserted