Tweaked the theme and syntax definitions a bit more. Configured the

file manager's theme, settings and keyboard mappings. Played around with
the keyboard mappings in general quite a bit more. All the toggles
output what they're doing now, though not their actual status in most
cases at this point, and only in normal mode. The bottom scrollbar is
now part of the gui scrollbar toggle as it turned out it can be
auto-disabled when the content isn't wide enough anyway. I realized
a bad hack to get visual paste ontop to work without replacing the paste
buffer with whatever it was pasting over meant that pasting at the start
and end of the line would leave issues with spacing, so I found a plugin
that fixed the problem the right way and hooked things up through that..
Whether syntax checking is enabled by default or needs to be toggled on
can now be set in the vimrc. Some small bugfixes and improvements were
also made.
This commit is contained in:
Kevin 2014-04-03 06:17:16 -04:00
parent 5cc350bd73
commit 6afa665edc
7 changed files with 154 additions and 109 deletions

3
.gitmodules vendored
View file

@ -55,3 +55,6 @@
[submodule "vim/bundle/syntastic"] [submodule "vim/bundle/syntastic"]
path = vim/bundle/syntastic path = vim/bundle/syntastic
url = https://github.com/scrooloose/syntastic.git url = https://github.com/scrooloose/syntastic.git
[submodule "vim/bundle/ReplaceWithRegister"]
path = vim/bundle/ReplaceWithRegister
url = https://github.com/vim-scripts/ReplaceWithRegister.git

@ -0,0 +1 @@
Subproject commit c77ef9d4e6e9572002274fe985e87c4d8b335d52

View file

@ -266,12 +266,12 @@ else
let s:termBlack = "Grey" let s:termBlack = "Grey"
endif endif
"COLOR SETTINGS: "SYNTAX COLORS:
"format: ('name','fg ','bg ','style ',s:lowcolor-fg,'lowcolor-bg') "format: ('name','fg ','bg ','style ',s:lowcolor-fg,'lowcolor-bg')
"example:('Line','000000','f0f0f0','italic,bold',s:termBlack ,'White') "example:('Line','000000','f0f0f0','italic,bold',s:termBlack ,'White')
call s:X("Visual","","262626","standout","",s:termBlack) call s:X("Visual","","262626","standout","",s:termBlack)
call s:X("Cursor","","262626","standout,bold,underline","",s:termBlack) call s:X("Cursor","","000000","standout,bold,underline","",s:termBlack)
call s:X("Pmenu","87d7ff","303030","","Grey","Blue") 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")
@ -314,8 +314,8 @@ call s:X("PreProc","ffd787","","","Yellow","")
call s:X("Operator","d75f5f","","","Red","") call s:X("Operator","d75f5f","","","Red","")
call s:X("NonText","87d7ff","","","Blue","") call s:X("NonText","87d7ff","","","Blue","")
call s:X("SpecialKey","000000","","",s:termBlack,"") call s:X("SpecialKey","000000","","",s:termBlack,"")
call s:X("Search","000000","87d7ff","bold",s:termBlack,"Blue") call s:X("Search","87d7ff","262626","standout","Blue",s:termBlack)
call s:X("IncSearch","","","standout","","") call s:X("IncSearch","87d7ff","262626","standout,bold","Blue",s:termBlack)
call s:X("Directory","87d7ff","","","Blue","") call s:X("Directory","87d7ff","","","Blue","")
call s:X("Question","87d7ff","","","Blue","") call s:X("Question","87d7ff","","","Blue","")
call s:X("ExtraWhitespace","262626","","standout",s:termBlack,"") call s:X("ExtraWhitespace","262626","","standout",s:termBlack,"")
@ -409,7 +409,18 @@ call s:X("rubyGlobalVariable","","","bold","","")
"lua "lua
hi! link luaOperator Conditional hi! link luaOperator Conditional
"syntastic error checking "vim-indent-guides
call s:X("IndentGuidesOdd","","7c7c7c","","","Grey")
call s:X("IndentGuidesEven","","1c1c1c","","",s:termBlack)
if !exists("g:indent_guides_auto_colors")
let g:indent_guides_auto_colors=0
endif
"PLUGIN COLOURS:
"taglist
hi! link TagListFileName Directory
"syntastic
call s:X("SyntasticError","d75f5f","","standout,bold","Red","") call s:X("SyntasticError","d75f5f","","standout,bold","Red","")
call s:X("SyntasticWarning","ffd787","","standout,bold","Yellow","") call s:X("SyntasticWarning","ffd787","","standout,bold","Yellow","")
hi! link SyntasticErrorLine SyntasticError hi! link SyntasticErrorLine SyntasticError
@ -419,16 +430,7 @@ hi! link SyntasticWarningSign Statement
hi! link qfSeparator Delimiter hi! link qfSeparator Delimiter
hi! link qfLineNr SyntasticError hi! link qfLineNr SyntasticError
"vim-indent-guides "COLOR DEFINITIONS:
call s:X("IndentGuidesOdd","","7c7c7c","","","Grey")
call s:X("IndentGuidesEven","","1c1c1c","","",s:termBlack)
if !exists("g:indent_guides_auto_colors")
let g:indent_guides_auto_colors = 0
endif
"plugins, etc.
hi! link TagListFileName Directory
"delete functions {{{ "delete functions {{{
delf s:X delf s:X
delf s:rgb delf s:rgb
@ -441,7 +443,7 @@ hi! link TagListFileName Directory
delf s:grey_number delf s:grey_number
"}}} "}}}
"lightline statusbar colours {{{ "colour presets (used with lightline) {{{
let s:base3 = '#eaeaea' let s:base3 = '#eaeaea'
let s:base23 = '#d0d0d0' let s:base23 = '#d0d0d0'
let s:base2 = '#c6c6c6' let s:base2 = '#c6c6c6'

View file

@ -13,10 +13,10 @@
" Reference: (view plugin documentation for the full list of commands each offers) " Reference: (view plugin documentation for the full list of commands each offers)
" <Leader>q | (N) -> toggle display of the quickfix list " <Leader>q | (N) -> toggle display of the quickfix list
" <Leader>l | (N) -> toggle display of the location list " <Leader>l | (N) -> toggle display of the location list
" ds" | (N) -> delete surrounding ""
" cs'" | (N) -> change surrounding '' to "" (any delimiters work) " cs'" | (N) -> change surrounding '' to "" (any delimiters work)
" cs"<q> | (N) -> change surrounding "" to the tag: <q></q> " cs"<q> | (N) -> change surrounding "" to the tag: <q></q>
" cst" | (N) -> change any surrounding tag to "" " cst" | (N) -> change any surrounding tag to ""
" ds" | (N) -> delete surrounding ""
" "
" Mappings: " Mappings:
" (mouse) " (mouse)
@ -25,22 +25,24 @@
" <Shift-MiddleClick> | (A) -> unbind this from vim so xorg can paste " <Shift-MiddleClick> | (A) -> unbind this from vim so xorg can paste
" "
" (tabs) " (tabs)
" <Ctrl-t> | (A) -> open a new tab
" <Ctrl-n> | (A) -> go to the next open tab " <Ctrl-n> | (A) -> go to the next open tab
" <Ctrl-p> | (A) -> go to the previous open tab " <Ctrl-p> | (A) -> go to the previous open tab
" <Ctrl-t> | (A) -> open a new tab
" `<Ctrl-t> | (N) -> create a new tab with vimfiler
" "
" (toggles) " (toggles)
" `` | (N) -> toggle the vimfiler sidebar on the left
" ~~ | (N) -> toggle the vimfiler sidebar on the right
" <Space> | (N) -> toggle folds " <Space> | (N) -> toggle folds
" <F1> | (A) -> toggle line numbers " <F1> | (A) -> toggle line numbers
" <F2> | (A) -> toggle row/column highlighting " <F2> | (A) -> toggle row/column cursor highlighting
" <F3> | (A) -> toggle line wrapping " <F3> | (A) -> toggle line wrapping
" <F4> | (A) -> toggle all folds " <F4> | (A) -> toggle all folds
" <F5> | (A) -> toggle spell check " <F5> | (A) -> toggle spell check
" <F6> | (A) -> toggle syntax checking " <F6> | (A) -> toggle syntax checking
" <F9> | (A) -> toggle the gundo undo history sidebar " <F9> | (A) -> toggle the gundo undo history sidebar
" <Shift-F9> | (A) -> toggle the tagbar sidebar " <Shift-F9> | (A) -> toggle the tagbar sidebar
" <Ctrl-F9> | (A) -> toggle the error list " <Ctrl-F9> | (A) -> toggle the location/error list
" `` | (N) -> toggle the filer explorer sidebar
" "
" (gvim toggles) " (gvim toggles)
" <Ctrl-F1> | (A) -> toggle the menu " <Ctrl-F1> | (A) -> toggle the menu
@ -63,6 +65,7 @@
" <Leader><C-w> | (N) -> remove whitespace " <Leader><C-w> | (N) -> remove whitespace
" <Leader><C-t> | (N) -> convert tabs into spaces " <Leader><C-t> | (N) -> convert tabs into spaces
" <Leader>\ | (N) -> remove search highlighting " <Leader>\ | (N) -> remove search highlighting
" <Leader><Esc> | (N) -> an alt mapping to remove search highlighting
" <Tab> | (V) -> indent all the lines currently selected " <Tab> | (V) -> indent all the lines currently selected
" <Tab> | (N) -> indent the current line " <Tab> | (N) -> indent the current line
" <Shift-Tab> | (V) -> unindent all the lines currently selected " <Shift-Tab> | (V) -> unindent all the lines currently selected
@ -75,32 +78,43 @@
" <Ctrl-Right> | (N) -> move to the end of the line " <Ctrl-Right> | (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
" "
" <Shift-Up> | (N) -> move a few lines up
" <Shift-Down> | (N) -> move a few lines down
" <Shift-Right> | (N) -> move a few lines right
" <Shift-Left> | (N) -> move a few lines left
"
" (selection) " (selection)
" <Ctrl-a> | (V) -> select all " <Ctrl-a> | (N) -> select all text
" <Ctrl-a> | (N) -> select all " <Leader>a | (N) -> select all text
" <Leader>a | (V) -> select all " <Ctrl-a> | (V) -> select all text
" <Leader>a | (N) -> select all " <Leader>a | (V) -> select all text
" <Shift-Up> | (V) -> toggle selection of all text above the cursor "
" <Shift-Up> | (N) -> select all text above the cursor " <Ctrl-Up> | (V) -> select all text above
" <Shift-Down> | (V) -> toggle selection of all text below the cursor " <Ctrl-Down> | (V) -> select all text below
" <Shift-Down> | (N) -> select all text below the cursor " <Ctrl-Right> | (V) -> select all text to the right
" <Shift-Right> | (V) -> toggle selection of all text to the right of the cursor " <Ctrl-Left> | (V) -> select all text to the left up to the indent
" <Shift-Right> | (N) -> select all text to the right of the cursor "
" <Shift-Left> | (V) -> toggle selection of all non-whitespace to the left " <Shift-Up> | (V) -> select a few lines up
" <Shift-Left> | (N) -> select all non-whitespace to the left " <Shift-Down> | (V) -> select a few lines down
" <Shift-Right> | (V) -> select a few lines right
" <Shift-Left> | (V) -> select a few lines left
" "
" (vimdiff) " (vimdiff)
" <Leader>> | (N) -> update differences " <Leader>> | (N) -> update differences
" <Leader>< | (N) -> an alt mapping to update differences
" >> | (N) -> next difference " >> | (N) -> next difference
" << | (N) -> previous difference " << | (N) -> previous difference
" >< | (N) -> replace diff in current pane with other pane " >< | (N) -> replace diff in current pane with other pane
" <> | (N) -> replace diff in other pane with current pane " <> | (N) -> replace diff in other pane with current pane
" "
" (paste) " (paste functions)
" y | (N) -> copies the character
" p | (V) -> paste and replace the currently selected text
" P | (V) -> paste and replace the currently selected text
" <Leader>p | (N) -> view the paste buffers and register contents " <Leader>p | (N) -> view the paste buffers and register contents
" <Leader>p<Direction> | (N) -> paste in the direction entered
" y | (N) -> copies the character at the cursor
" P | (V) -> save selection to the buffer and paste over
" p | (V) -> preserve the buffer pasting over selected text
"
" (delete/cut functions)
" <Leader>d | (V) -> delete the currently selected text " <Leader>d | (V) -> delete the currently selected text
" <Leader>x | (V) -> delete the currently selected text " <Leader>x | (V) -> delete the currently selected text
" <Leader>x | (N) -> delete the char(s) under and the cursor " <Leader>x | (N) -> delete the char(s) under and the cursor
@ -130,79 +144,80 @@
"} "}
"TABS:{ "TABS:{
"move to the next and previous tabs
nnoremap <silent><expr> <C-t> ':tabnew<CR>'
nnoremap <silent><expr> <C-n> ':tabnext<CR>' nnoremap <silent><expr> <C-n> ':tabnext<CR>'
nnoremap <silent><expr> <C-p> ':tabprev<CR>' nnoremap <silent><expr> <C-p> ':tabprev<CR>'
nnoremap <silent><expr> <C-t> ':tabnew<CR>'
nnoremap <silent><expr> `<C-t> ':VimFiler -tab -project<CR>'
"} "}
"TOGGLES:{ "TOGGLES:{
"bindings to trigger vimfiler
nnoremap <silent><expr> `` ':VimFilerExplorer -direction=topleft -winwidth=45<CR>'
nnoremap <silent><expr> ~~ ':VimFilerExplorer -direction=botright -winwidth=45<CR>'
"toggle folded code at foldpoints "toggle folded code at foldpoints
nnoremap <Space> za nnoremap <Space> za
"unmap F1 from help then map it to toggle the display of line numbers "unmap F1 from help then map it to toggle the display of line numbers
nnoremap <silent><expr> <F1> ':set number!<CR>' nnoremap <silent><expr> <F1> ':set number!<CR>:echo "Line numbers toggled"<CR>'
vnoremap <silent><expr> <F1> '<Esc>:set number!<CR>v' xnoremap <silent><expr> <F1> '<Esc>:set number!<CR>v'
inoremap <silent><expr> <F1> '<C-O>:set number!<CR>' inoremap <silent><expr> <F1> '<C-O>:set number!<CR>'
"toggle the cursor line and column "toggle the cursor line and column
nnoremap <silent><expr> <F2> ':set cursorline! cursorcolumn!<CR>' nnoremap <silent><expr> <F2> ':set cursorline! cursorcolumn!<CR>:echo "Cursor crosshair toggled"<CR>'
vnoremap <silent><expr> <F2> '<Esc>:set cursorline! cursorcolumn!<CR>v' xnoremap <silent><expr> <F2> '<Esc>:set cursorline! cursorcolumn!<CR>v'
inoremap <silent><expr> <F2> '<C-O>:set cursorline! cursorcolumn!<CR>' inoremap <silent><expr> <F2> '<C-O>:set cursorline! cursorcolumn!<CR>'
"toggle line wrapping (and bottom bar if using the gui) "toggle line wrapping (and bottom bar if using the gui)
nnoremap <silent><expr> <F3> ':set wrap! go'.'-+'[&wrap]."=b\r" nnoremap <silent><expr> <F3> ':echo "Line wrapping toggled"<CR>:set wrap!<CR>'
vnoremap <silent><expr> <F3> '<Esc>:set wrap! go'.'-+'[&wrap]."=b\rv" xnoremap <silent><expr> <F3> '<Esc>:set wrap!<CR>v'
inoremap <silent><expr> <F3> '<C-O>:set wrap! go'.'-+'[&wrap]."=b\r" inoremap <silent><expr> <F3> '<C-O>:set wrap!<CR>'
"toggle all folds "toggle all folds
nnoremap <F4> zi nnoremap <F4> zi:echo "Code Folding Toggled"<CR>
vnoremap <F4> <Esc>ziv xnoremap <F4> <Esc>ziv
inoremap <F4> <C-O>zi inoremap <F4> <C-O>zi
"toggle spellcheck "toggle spellcheck
nnoremap <silent><expr> <F5> ':set spell!<CR>' nnoremap <silent><expr> <F5> ':set spell!<CR>:echo "Spell checking toggled"<CR>'
vnoremap <silent><expr> <F5> '<Esc>:set spell!<CR>v' xnoremap <silent><expr> <F5> '<Esc>:set spell!<CR>v'
inoremap <silent><expr> <F5> '<C-O>:set spell!<CR>' inoremap <silent><expr> <F5> '<C-O>:set spell!<CR>'
"toggle syntax checking "toggle syntax checking
nnoremap <silent><expr> <F6> ':SyntasticToggleMode<CR>' nnoremap <silent><expr> <F6> ':SyntasticToggleMode<CR>'
vnoremap <silent><expr> <F6> '<Esc>:SyntasticToggleMode<CR>v' xnoremap <silent><expr> <F6> '<Esc>:SyntasticToggleMode<CR>v'
inoremap <silent><expr> <F6> '<C-O>:SyntasticToggleMode<CR>' inoremap <silent><expr> <F6> '<C-O>:SyntasticToggleMode<CR>'
"bindings to trigger the gundo undo history "bindings to trigger the gundo undo history
nnoremap <silent><expr> <F9> ':GundoToggle<CR>' nnoremap <silent><expr> <F9> ':GundoToggle<CR>:echo "Undo history sidebar toggled"<CR>'
vnoremap <silent><expr> <F9> '<Esc>:GundoToggle<CR>v' xnoremap <silent><expr> <F9> '<Esc>:GundoToggle<CR>v'
inoremap <silent><expr> <F9> '<C-O>:GundoToggle<CR>' inoremap <silent><expr> <F9> '<C-O>:GundoToggle<CR>'
"bindings to trigger the tagbar list of tags "bindings to trigger the tagbar list of tags
nnoremap <silent><expr> <S-F9> ':TagbarToggle<CR>' nnoremap <silent><expr> <S-F9> ':TagbarToggle<CR>:echo "Code tagbar toggled"<CR>'
vnoremap <silent><expr> <S-F9> '<Esc>:TagbarToggle<CR>v' xnoremap <silent><expr> <S-F9> '<Esc>:TagbarToggle<CR>v'
inoremap <silent><expr> <S-F9> '<C-O>:TagbarToggle<CR>' inoremap <silent><expr> <S-F9> '<C-O>:TagbarToggle<CR>'
"bindings to trigger the tagbar list of errors "bindings to trigger the tagbar list of errors
nmap <script> <silent> <C-F9> :call ToggleLocationList()<CR> nmap <script> <silent> <C-F9> :call ToggleLocationList()<CR>:echo "Error/Location list toggled"<CR>
"bindings to trigger the filer explorer
nnoremap <silent><expr> `` ':VimFilerExplorer -winwidth=30<CR>'
"} "}
"GVIM TOGGLES:{ "GVIM TOGGLES:{
"map toggles for the menu, toolbar and vertical scrollbar "map toggles for the menu, toolbar and vertical scrollbar
nnoremap <silent><expr> <C-F1> ":if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>" nnoremap <silent><expr> <C-F1> ":if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>:echo 'Menu bar toggled'<CR>"
vnoremap <silent><expr> <C-F1> "<Esc>:if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>v" vnoremap <silent><expr> <C-F1> "<Esc>:if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>v"
inoremap <silent><expr> <C-F1> "<C-O>:if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>" inoremap <silent><expr> <C-F1> "<C-O>:if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>"
nnoremap <silent><expr> <C-F2> ":if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>" nnoremap <silent><expr> <C-F2> ":if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>:echo 'Toolbar toggled'<CR>"
vnoremap <silent><expr> <C-F2> "<Esc>:if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>v" vnoremap <silent><expr> <C-F2> "<Esc>:if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>v"
inoremap <silent><expr> <C-F2> "<C-O>:if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>" inoremap <silent><expr> <C-F2> "<C-O>:if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>"
nnoremap <silent><expr> <C-F3> ":if &go=~#'r'<Bar>set go-=r<Bar>else<Bar>set go+=r<Bar>endif<CR>" nnoremap <silent><expr> <C-F3> ":if &go=~#'r'<Bar>set go-=r<Bar>set go-=L<Bar>set go-=b<Bar>else<Bar>set go+=r<Bar>set go+=L<Bar>set go+=b<Bar>endif<CR>:echo 'Scrollbars toggled'<CR>"
vnoremap <silent><expr> <C-F3> "<Esc>:if &go=~#'r'<Bar>set go-=r<Bar>else<Bar>set go+=r<Bar>endif<CR>v" vnoremap <silent><expr> <C-F3> "<Esc>:if &go=~#'r'<Bar>set go-=r<Bar>set go-=L<Bar>set go-=b<Bar>else<Bar>set go+=r<Bar>set go+=L<Bar>set go+=b<Bar>endif<CR>v"
inoremap <silent><expr> <C-F3> "<C-O>:if &go=~#'r'<Bar>set go-=r<Bar>else<Bar>set go+=r<Bar>endif<CR>" inoremap <silent><expr> <C-F3> "<C-O>:if &go=~#'r'<Bar>set go-=r<Bar>set go-=L<Bar>set go-=b<Bar>else<Bar>set go+=r<Bar>set go+=L<Bar>set go+=b<Bar>endif<CR>"
"} "}
"SPELLING AND COMPLETION:{ "COMPLETION:{
"emmet switch triggerkey from <Ctrl-Y> "emmet switch triggerkey from <Ctrl-Y>
let g:user_emmet_leader_key='<Leader>,' let g:user_emmet_leader_key='<Leader>,'
@ -226,10 +241,11 @@
nnoremap <Backspace> i<Backspace><Esc>l nnoremap <Backspace> i<Backspace><Esc>l
"formatting options to apply to the whole document "formatting options to apply to the whole document
nnoremap <Leader><C-f> mzgg=G`z<CR> nnoremap <Leader><C-f> mzgg=G`z<CR>:echo "The document has been formatted"<CR>
nnoremap <silent><expr> <Leader><C-w> ':FixWhitespace<CR>' nnoremap <silent><expr> <Leader><C-w> ':FixWhitespace<CR>:echo "Trailing whitespace has been removed"<CR>'
nnoremap <silent><expr> <Leader><C-t> ':retab<CR>:noh<CR>' nnoremap <silent><expr> <Leader><C-t> ':retab<CR>:noh<CR>:echo "Tabs have been converted to spaces"<CR>'
nnoremap <silent><expr> <Leader>/ ':noh<CR>' nnoremap <silent><expr> <Leader>/ ':noh<CR>:echo "Search results have been cleared"<CR>'
nnoremap <silent><expr> <Leader><Esc> ':noh<CR>:echo "Search results have been cleared"<CR>'
"tab and untab the currently selected lines "tab and untab the currently selected lines
vnoremap <Tab> >gv vnoremap <Tab> >gv
@ -242,7 +258,13 @@
"additional mappings for easier access "additional mappings for easier access
nnoremap = + nnoremap = +
"remap keys to scroll through text "remap keys for speedier movement
nnoremap <S-Up> 4k
nnoremap <S-Down> 4j
nnoremap <S-Right> 6l
nnoremap <S-Left> 6h
"remap keys to scroll to the end in a direction
nnoremap <C-Up> gg0 nnoremap <C-Up> gg0
nnoremap <C-Down> G$ nnoremap <C-Down> G$
nnoremap <C-Right> $ nnoremap <C-Right> $
@ -250,24 +272,29 @@
"} "}
"SELECTION:{ "SELECTION:{
"map remap keys to select text "ctrl-a to select all (and an alt for screen users)
vnoremap <C-a> <Esc>gg0vG$
nnoremap <C-a> gg0vG$ nnoremap <C-a> gg0vG$
vnoremap <Leader>a <Esc>gg0vG$ xnoremap <C-a> <Esc>gg0vG$
nnoremap <Leader>a gg0vG$ xnoremap <Leader>a <Esc>gg0vG$
vnoremap <S-Up> gg0 xnoremap <Leader>a gg0vG$
nnoremap <S-Up> vgg0
vnoremap <S-Down> G$ "map remap keys for speedier text selection
nnoremap <S-Down> vG$ xnoremap <S-Up> 4k
vnoremap <S-Right> $ xnoremap <S-Down> 4j
nnoremap <S-Right> v$ xnoremap <S-Right> 6l
vnoremap <S-Left> ^ xnoremap <S-Left> 6h
nnoremap <S-Left> v^
"remap keys to select all text in one direction
xnoremap <C-Up> gg0
xnoremap <C-Down> G$
xnoremap <C-Right> $
xnoremap <C-Left> ^
"} "}
"VIMDIFF:{ "VIMDIFF:{
"map shortcuts for vimdiff "map shortcuts for vimdiff
nnoremap <silent><expr> <Leader>> ':diffu<CR>' nnoremap <silent><expr> <Leader>> ':diffu<CR>'
nnoremap <silent><expr> <Leader>< ':diffu<CR>'
nnoremap >> ]c nnoremap >> ]c
nnoremap << [c nnoremap << [c
nnoremap <> dp nnoremap <> dp
@ -278,12 +305,15 @@
"display contents of paste buffers "display contents of paste buffers
nnoremap <silent><expr> <Leader>p ':reg<CR>' nnoremap <silent><expr> <Leader>p ':reg<CR>'
"allow y to copy in normal mode "allow y to copy a single character in normal mode
nnoremap y vy<Esc> nnoremap y vy<Esc>
"alternatives that preserve the paste buffer "P puts text it replaces in the buffer and p does not
vnoremap p "_dP vnoremap P p
vnoremap P "_dP xmap p <Plug>ReplaceWithRegisterVisual
nmap <Leader>p <Plug>ReplaceWithRegisterOperator
"Alternatives to deletion commands that don't replace the buffer
vnoremap <Leader>x "_x vnoremap <Leader>x "_x
nnoremap <Leader>x "_x nnoremap <Leader>x "_x
vnoremap <Leader>X "_X vnoremap <Leader>X "_X

View file

@ -97,7 +97,7 @@
endfunction endfunction
"status bar config with and without powerline fonts "status bar config with and without powerline fonts
if powerlinefonts == 1 if (powerlinefonts == 1)
let g:lightline = { let g:lightline = {
\ 'colorscheme': 'darkcloud', \ 'colorscheme': 'darkcloud',
\ 'active': { \ 'active': {
@ -153,20 +153,44 @@
let g:vim_markdown_initial_foldlevel=2 let g:vim_markdown_initial_foldlevel=2
"}}} "}}}
"SYNTASTIC: CONFIGURE SYNTAX CHECKING {{{
if (autochecksyntax == 1)
let g:syntastic_mode_map = {'mode':'active','active_filetypes':[],'passive_filetypes':[]}
let g:syntastic_check_on_open=1
else
let g:syntastic_mode_map = {'mode':'passive','active_filetypes':[],'passive_filetypes':[]}
let g:syntastic_check_on_open=0
endif
let g:syntastic_always_populate_loc_list=1
let g:syntastic_auto_loc_list=1
let g:syntastic_loc_list_height=5
"}}}
"VIM FILER: SETTINGS {{{ "VIM FILER: SETTINGS {{{
let g:vimfiler_as_default_explorer=1 let g:vimfiler_as_default_explorer=1
let g:vimfiler_safe_mode_by_default=0
let g:vimfiler_enable_auto_cd=1 let g:vimfiler_enable_auto_cd=1
let g:vimfiler_tree_indentation=2
let g:vimfiler_explorer_columns='type:time'
let g:vimfiler_tree_closed_icon='▸' let g:vimfiler_tree_closed_icon='▸'
let g:vimfiler_tree_opened_icon='▾' let g:vimfiler_tree_opened_icon='▾'
let g:vimfiler_file_icon='-' let g:vimfiler_file_icon='-'
let g:vimfiler_marked_file_icon='+' let g:vimfiler_marked_file_icon='+'
"edit files by double clicking them "edit files by double clicking them, and justify the cursor on the left
autocmd FileType vimfiler nmap <buffer> <2-LeftMouse> <Plug>(vimfiler_edit_file) autocmd FileType vimfiler nmap <buffer> <2-LeftMouse> <Plug>(vimfiler_edit_file)
autocmd FileType vimfiler nmap <buffer> <LeftMouse> <LeftMouse>0
autocmd FileType vimfiler nmap <buffer> <MiddleMouse> <LeftMouse>0
autocmd FileType vimfiler nmap <buffer> <RightMouse> <LeftMouse>0
autocmd FileType vimfiler nmap <buffer> <Right> l
autocmd FileType vimfiler nmap <buffer> <Left> h
autocmd FileType vimfiler setlocal nonumber wrap
autocmd FileType vimfiler setlocal nocursorcolumn
"open automatically if vim was run without any files "open automatically if vim was run without any files
autocmd VimEnter * if !argc() | VimFiler -project | endif autocmd VimEnter * if !argc() | VimFiler -quit -project | endif
"filetype associations (just a sample to show how it can work) "filetype associations (just a sample to show how it can work)
"if has('unix') "if has('unix')
@ -209,10 +233,3 @@
let g:neocomplcache_omni_patterns.objc='\h\w\+\|\h\w*\%(\.\|->\)\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.objj='[\[ \.]\w\+$\|:\w*$'
"}}} "}}}
"SYNTASTIC: CONFIGURE SYNTAX CHECKING {{{
let g:syntastic_check_on_open=1
let g:syntastic_always_populate_loc_list=1
let g:syntastic_auto_loc_list=1
let g:syntastic_loc_list_height=5
"}}}

View file

@ -91,16 +91,5 @@
"GVIM: GUI CONFIG OPTIONS {{{ "GVIM: GUI CONFIG OPTIONS {{{
set guicursor+=a:blinkon0 "disable the blinking cursor set guicursor+=a:blinkon0 "disable the blinking cursor
set guioptions=aegi
set guioptions-=T "remove the toolbar
set guioptions-=m "remove the toolbar
if &wrap
set go-=b "disable the bottom scrollbar on launch iff text wrapping is enabled
else
set go+=b "enable the bottom scrollbar on launch iff text wrapping is disabled
endif
"disable the bottom scrollbar if currently the vimfiler
autocmd FileType vimfiler set go-=b
"}}} "}}}

5
vimrc
View file

@ -21,11 +21,14 @@
"Powerline Font Support: (1:enabled, 0:disabled) "Powerline Font Support: (1:enabled, 0:disabled)
let powerlinefonts=1 let powerlinefonts=1
"Syntax Checking Enabled: (1:enabled, 0:must be toggled on)
let autochecksyntax=1
"GVim Font Selection: (term font set by terminal) "GVim Font Selection: (term font set by terminal)
set guifont=Droid\ Sans\ Mono\ 12 set guifont=Droid\ Sans\ Mono\ 12
"Add Config Directory: (distro-agnostic system-wide) "Add Config Directory: (distro-agnostic system-wide)
set runtimepath+=/etc/vim set runtimepath+=/etc/vim,/etc/vim/after
"Load Settings: "Load Settings:
runtime config/settings.vim runtime config/settings.vim