mirror of
https://github.com/prurigro/darkcloud-nvimconfig.git
synced 2024-11-09 15:06:38 -05:00
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:
parent
5cc350bd73
commit
6afa665edc
7 changed files with 154 additions and 109 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -55,3 +55,6 @@
|
|||
[submodule "vim/bundle/syntastic"]
|
||||
path = vim/bundle/syntastic
|
||||
url = https://github.com/scrooloose/syntastic.git
|
||||
[submodule "vim/bundle/ReplaceWithRegister"]
|
||||
path = vim/bundle/ReplaceWithRegister
|
||||
url = https://github.com/vim-scripts/ReplaceWithRegister.git
|
||||
|
|
1
vim/bundle/ReplaceWithRegister
Submodule
1
vim/bundle/ReplaceWithRegister
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit c77ef9d4e6e9572002274fe985e87c4d8b335d52
|
|
@ -266,12 +266,12 @@ else
|
|||
let s:termBlack = "Grey"
|
||||
endif
|
||||
|
||||
"COLOR SETTINGS:
|
||||
"SYNTAX COLORS:
|
||||
"format: ('name','fg ','bg ','style ',s:lowcolor-fg,'lowcolor-bg')
|
||||
"example:('Line','000000','f0f0f0','italic,bold',s:termBlack ,'White')
|
||||
|
||||
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("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("NonText","87d7ff","","","Blue","")
|
||||
call s:X("SpecialKey","000000","","",s:termBlack,"")
|
||||
call s:X("Search","000000","87d7ff","bold",s:termBlack,"Blue")
|
||||
call s:X("IncSearch","","","standout","","")
|
||||
call s:X("Search","87d7ff","262626","standout","Blue",s:termBlack)
|
||||
call s:X("IncSearch","87d7ff","262626","standout,bold","Blue",s:termBlack)
|
||||
call s:X("Directory","87d7ff","","","Blue","")
|
||||
call s:X("Question","87d7ff","","","Blue","")
|
||||
call s:X("ExtraWhitespace","262626","","standout",s:termBlack,"")
|
||||
|
@ -409,7 +409,18 @@ call s:X("rubyGlobalVariable","","","bold","","")
|
|||
"lua
|
||||
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("SyntasticWarning","ffd787","","standout,bold","Yellow","")
|
||||
hi! link SyntasticErrorLine SyntasticError
|
||||
|
@ -419,16 +430,7 @@ hi! link SyntasticWarningSign Statement
|
|||
hi! link qfSeparator Delimiter
|
||||
hi! link qfLineNr SyntasticError
|
||||
|
||||
"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
|
||||
|
||||
"plugins, etc.
|
||||
hi! link TagListFileName Directory
|
||||
|
||||
"COLOR DEFINITIONS:
|
||||
"delete functions {{{
|
||||
delf s:X
|
||||
delf s:rgb
|
||||
|
@ -441,7 +443,7 @@ hi! link TagListFileName Directory
|
|||
delf s:grey_number
|
||||
"}}}
|
||||
|
||||
"lightline statusbar colours {{{
|
||||
"colour presets (used with lightline) {{{
|
||||
let s:base3 = '#eaeaea'
|
||||
let s:base23 = '#d0d0d0'
|
||||
let s:base2 = '#c6c6c6'
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
" Reference: (view plugin documentation for the full list of commands each offers)
|
||||
" <Leader>q | (N) -> toggle display of the quickfix list
|
||||
" <Leader>l | (N) -> toggle display of the location list
|
||||
" ds" | (N) -> delete surrounding ""
|
||||
" cs'" | (N) -> change surrounding '' to "" (any delimiters work)
|
||||
" cs"<q> | (N) -> change surrounding "" to the tag: <q></q>
|
||||
" cst" | (N) -> change any surrounding tag to ""
|
||||
" ds" | (N) -> delete surrounding ""
|
||||
"
|
||||
" Mappings:
|
||||
" (mouse)
|
||||
|
@ -25,22 +25,24 @@
|
|||
" <Shift-MiddleClick> | (A) -> unbind this from vim so xorg can paste
|
||||
"
|
||||
" (tabs)
|
||||
" <Ctrl-t> | (A) -> open a new tab
|
||||
" <Ctrl-n> | (A) -> go to the next 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)
|
||||
" `` | (N) -> toggle the vimfiler sidebar on the left
|
||||
" ~~ | (N) -> toggle the vimfiler sidebar on the right
|
||||
" <Space> | (N) -> toggle folds
|
||||
" <F1> | (A) -> toggle line numbers
|
||||
" <F2> | (A) -> toggle row/column highlighting
|
||||
" <F2> | (A) -> toggle row/column cursor highlighting
|
||||
" <F3> | (A) -> toggle line wrapping
|
||||
" <F4> | (A) -> toggle all folds
|
||||
" <F5> | (A) -> toggle spell check
|
||||
" <F6> | (A) -> toggle syntax checking
|
||||
" <F9> | (A) -> toggle the gundo undo history sidebar
|
||||
" <Shift-F9> | (A) -> toggle the tagbar sidebar
|
||||
" <Ctrl-F9> | (A) -> toggle the error list
|
||||
" `` | (N) -> toggle the filer explorer sidebar
|
||||
" <Ctrl-F9> | (A) -> toggle the location/error list
|
||||
"
|
||||
" (gvim toggles)
|
||||
" <Ctrl-F1> | (A) -> toggle the menu
|
||||
|
@ -63,6 +65,7 @@
|
|||
" <Leader><C-w> | (N) -> remove whitespace
|
||||
" <Leader><C-t> | (N) -> convert tabs into spaces
|
||||
" <Leader>\ | (N) -> remove search highlighting
|
||||
" <Leader><Esc> | (N) -> an alt mapping to remove search highlighting
|
||||
" <Tab> | (V) -> indent all the lines currently selected
|
||||
" <Tab> | (N) -> indent the current line
|
||||
" <Shift-Tab> | (V) -> unindent all the lines currently selected
|
||||
|
@ -75,32 +78,43 @@
|
|||
" <Ctrl-Right> | (N) -> move to the end of the line
|
||||
" <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)
|
||||
" <Ctrl-a> | (V) -> select all
|
||||
" <Ctrl-a> | (N) -> select all
|
||||
" <Leader>a | (V) -> select all
|
||||
" <Leader>a | (N) -> select all
|
||||
" <Shift-Up> | (V) -> toggle selection of all text above the cursor
|
||||
" <Shift-Up> | (N) -> select all text above the cursor
|
||||
" <Shift-Down> | (V) -> toggle selection of all text below the cursor
|
||||
" <Shift-Down> | (N) -> select all text below the cursor
|
||||
" <Shift-Right> | (V) -> toggle selection of all text to the right of the cursor
|
||||
" <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-Left> | (N) -> select all non-whitespace to the left
|
||||
" <Ctrl-a> | (N) -> select all text
|
||||
" <Leader>a | (N) -> select all text
|
||||
" <Ctrl-a> | (V) -> select all text
|
||||
" <Leader>a | (V) -> select all text
|
||||
"
|
||||
" <Ctrl-Up> | (V) -> select all text above
|
||||
" <Ctrl-Down> | (V) -> select all text below
|
||||
" <Ctrl-Right> | (V) -> select all text to the right
|
||||
" <Ctrl-Left> | (V) -> select all text to the left up to the indent
|
||||
"
|
||||
" <Shift-Up> | (V) -> select a few lines up
|
||||
" <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)
|
||||
" <Leader>> | (N) -> update differences
|
||||
" <Leader>< | (N) -> an alt mapping to update differences
|
||||
" >> | (N) -> next difference
|
||||
" << | (N) -> previous difference
|
||||
" >< | (N) -> replace diff in current pane with other pane
|
||||
" <> | (N) -> replace diff in other pane with current pane
|
||||
"
|
||||
" (paste)
|
||||
" y | (N) -> copies the character
|
||||
" p | (V) -> paste and replace the currently selected text
|
||||
" P | (V) -> paste and replace the currently selected text
|
||||
" (paste functions)
|
||||
" <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>x | (V) -> delete the currently selected text
|
||||
" <Leader>x | (N) -> delete the char(s) under and the cursor
|
||||
|
@ -130,79 +144,80 @@
|
|||
"}
|
||||
|
||||
"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-p> ':tabprev<CR>'
|
||||
nnoremap <silent><expr> <C-t> ':tabnew<CR>'
|
||||
nnoremap <silent><expr> `<C-t> ':VimFiler -tab -project<CR>'
|
||||
"}
|
||||
|
||||
"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
|
||||
nnoremap <Space> za
|
||||
|
||||
"unmap F1 from help then map it to toggle the display of line numbers
|
||||
nnoremap <silent><expr> <F1> ':set number!<CR>'
|
||||
vnoremap <silent><expr> <F1> '<Esc>:set number!<CR>v'
|
||||
nnoremap <silent><expr> <F1> ':set number!<CR>:echo "Line numbers toggled"<CR>'
|
||||
xnoremap <silent><expr> <F1> '<Esc>:set number!<CR>v'
|
||||
inoremap <silent><expr> <F1> '<C-O>:set number!<CR>'
|
||||
|
||||
"toggle the cursor line and column
|
||||
nnoremap <silent><expr> <F2> ':set cursorline! cursorcolumn!<CR>'
|
||||
vnoremap <silent><expr> <F2> '<Esc>:set cursorline! cursorcolumn!<CR>v'
|
||||
nnoremap <silent><expr> <F2> ':set cursorline! cursorcolumn!<CR>:echo "Cursor crosshair toggled"<CR>'
|
||||
xnoremap <silent><expr> <F2> '<Esc>:set cursorline! cursorcolumn!<CR>v'
|
||||
inoremap <silent><expr> <F2> '<C-O>:set cursorline! cursorcolumn!<CR>'
|
||||
|
||||
"toggle line wrapping (and bottom bar if using the gui)
|
||||
nnoremap <silent><expr> <F3> ':set wrap! go'.'-+'[&wrap]."=b\r"
|
||||
vnoremap <silent><expr> <F3> '<Esc>:set wrap! go'.'-+'[&wrap]."=b\rv"
|
||||
inoremap <silent><expr> <F3> '<C-O>:set wrap! go'.'-+'[&wrap]."=b\r"
|
||||
nnoremap <silent><expr> <F3> ':echo "Line wrapping toggled"<CR>:set wrap!<CR>'
|
||||
xnoremap <silent><expr> <F3> '<Esc>:set wrap!<CR>v'
|
||||
inoremap <silent><expr> <F3> '<C-O>:set wrap!<CR>'
|
||||
|
||||
"toggle all folds
|
||||
nnoremap <F4> zi
|
||||
vnoremap <F4> <Esc>ziv
|
||||
nnoremap <F4> zi:echo "Code Folding Toggled"<CR>
|
||||
xnoremap <F4> <Esc>ziv
|
||||
inoremap <F4> <C-O>zi
|
||||
|
||||
"toggle spellcheck
|
||||
nnoremap <silent><expr> <F5> ':set spell!<CR>'
|
||||
vnoremap <silent><expr> <F5> '<Esc>:set spell!<CR>v'
|
||||
nnoremap <silent><expr> <F5> ':set spell!<CR>:echo "Spell checking toggled"<CR>'
|
||||
xnoremap <silent><expr> <F5> '<Esc>:set spell!<CR>v'
|
||||
inoremap <silent><expr> <F5> '<C-O>:set spell!<CR>'
|
||||
|
||||
"toggle syntax checking
|
||||
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>'
|
||||
|
||||
"bindings to trigger the gundo undo history
|
||||
nnoremap <silent><expr> <F9> ':GundoToggle<CR>'
|
||||
vnoremap <silent><expr> <F9> '<Esc>:GundoToggle<CR>v'
|
||||
nnoremap <silent><expr> <F9> ':GundoToggle<CR>:echo "Undo history sidebar toggled"<CR>'
|
||||
xnoremap <silent><expr> <F9> '<Esc>:GundoToggle<CR>v'
|
||||
inoremap <silent><expr> <F9> '<C-O>:GundoToggle<CR>'
|
||||
|
||||
"bindings to trigger the tagbar list of tags
|
||||
nnoremap <silent><expr> <S-F9> ':TagbarToggle<CR>'
|
||||
vnoremap <silent><expr> <S-F9> '<Esc>:TagbarToggle<CR>v'
|
||||
nnoremap <silent><expr> <S-F9> ':TagbarToggle<CR>:echo "Code tagbar toggled"<CR>'
|
||||
xnoremap <silent><expr> <S-F9> '<Esc>:TagbarToggle<CR>v'
|
||||
inoremap <silent><expr> <S-F9> '<C-O>:TagbarToggle<CR>'
|
||||
|
||||
"bindings to trigger the tagbar list of errors
|
||||
nmap <script> <silent> <C-F9> :call ToggleLocationList()<CR>
|
||||
|
||||
"bindings to trigger the filer explorer
|
||||
nnoremap <silent><expr> `` ':VimFilerExplorer -winwidth=30<CR>'
|
||||
nmap <script> <silent> <C-F9> :call ToggleLocationList()<CR>:echo "Error/Location list toggled"<CR>
|
||||
"}
|
||||
|
||||
"GVIM TOGGLES:{
|
||||
"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"
|
||||
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"
|
||||
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>"
|
||||
vnoremap <silent><expr> <C-F3> "<Esc>:if &go=~#'r'<Bar>set go-=r<Bar>else<Bar>set go+=r<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>"
|
||||
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>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>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>
|
||||
let g:user_emmet_leader_key='<Leader>,'
|
||||
|
||||
|
@ -226,10 +241,11 @@
|
|||
nnoremap <Backspace> i<Backspace><Esc>l
|
||||
|
||||
"formatting options to apply to the whole document
|
||||
nnoremap <Leader><C-f> mzgg=G`z<CR>
|
||||
nnoremap <silent><expr> <Leader><C-w> ':FixWhitespace<CR>'
|
||||
nnoremap <silent><expr> <Leader><C-t> ':retab<CR>:noh<CR>'
|
||||
nnoremap <silent><expr> <Leader>/ ':noh<CR>'
|
||||
nnoremap <Leader><C-f> mzgg=G`z<CR>:echo "The document has been formatted"<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>:echo "Tabs have been converted to spaces"<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
|
||||
vnoremap <Tab> >gv
|
||||
|
@ -242,7 +258,13 @@
|
|||
"additional mappings for easier access
|
||||
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-Down> G$
|
||||
nnoremap <C-Right> $
|
||||
|
@ -250,24 +272,29 @@
|
|||
"}
|
||||
|
||||
"SELECTION:{
|
||||
"map remap keys to select text
|
||||
vnoremap <C-a> <Esc>gg0vG$
|
||||
"ctrl-a to select all (and an alt for screen users)
|
||||
nnoremap <C-a> gg0vG$
|
||||
vnoremap <Leader>a <Esc>gg0vG$
|
||||
nnoremap <Leader>a gg0vG$
|
||||
vnoremap <S-Up> gg0
|
||||
nnoremap <S-Up> vgg0
|
||||
vnoremap <S-Down> G$
|
||||
nnoremap <S-Down> vG$
|
||||
vnoremap <S-Right> $
|
||||
nnoremap <S-Right> v$
|
||||
vnoremap <S-Left> ^
|
||||
nnoremap <S-Left> v^
|
||||
xnoremap <C-a> <Esc>gg0vG$
|
||||
xnoremap <Leader>a <Esc>gg0vG$
|
||||
xnoremap <Leader>a gg0vG$
|
||||
|
||||
"map remap keys for speedier text selection
|
||||
xnoremap <S-Up> 4k
|
||||
xnoremap <S-Down> 4j
|
||||
xnoremap <S-Right> 6l
|
||||
xnoremap <S-Left> 6h
|
||||
|
||||
"remap keys to select all text in one direction
|
||||
xnoremap <C-Up> gg0
|
||||
xnoremap <C-Down> G$
|
||||
xnoremap <C-Right> $
|
||||
xnoremap <C-Left> ^
|
||||
"}
|
||||
|
||||
"VIMDIFF:{
|
||||
"map shortcuts for vimdiff
|
||||
nnoremap <silent><expr> <Leader>> ':diffu<CR>'
|
||||
nnoremap <silent><expr> <Leader>< ':diffu<CR>'
|
||||
nnoremap >> ]c
|
||||
nnoremap << [c
|
||||
nnoremap <> dp
|
||||
|
@ -278,12 +305,15 @@
|
|||
"display contents of paste buffers
|
||||
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>
|
||||
|
||||
"alternatives that preserve the paste buffer
|
||||
vnoremap p "_dP
|
||||
vnoremap P "_dP
|
||||
"P puts text it replaces in the buffer and p does not
|
||||
vnoremap P p
|
||||
xmap p <Plug>ReplaceWithRegisterVisual
|
||||
nmap <Leader>p <Plug>ReplaceWithRegisterOperator
|
||||
|
||||
"Alternatives to deletion commands that don't replace the buffer
|
||||
vnoremap <Leader>x "_x
|
||||
nnoremap <Leader>x "_x
|
||||
vnoremap <Leader>X "_X
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
endfunction
|
||||
|
||||
"status bar config with and without powerline fonts
|
||||
if powerlinefonts == 1
|
||||
if (powerlinefonts == 1)
|
||||
let g:lightline = {
|
||||
\ 'colorscheme': 'darkcloud',
|
||||
\ 'active': {
|
||||
|
@ -153,20 +153,44 @@
|
|||
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 {{{
|
||||
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_tree_indentation=2
|
||||
let g:vimfiler_explorer_columns='type:time'
|
||||
let g:vimfiler_tree_closed_icon='▸'
|
||||
let g:vimfiler_tree_opened_icon='▾'
|
||||
let g:vimfiler_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> <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
|
||||
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)
|
||||
"if has('unix')
|
||||
|
@ -209,10 +233,3 @@
|
|||
let g:neocomplcache_omni_patterns.objc='\h\w\+\|\h\w*\%(\.\|->\)\h\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
|
||||
"}}}
|
||||
|
|
|
@ -91,16 +91,5 @@
|
|||
|
||||
"GVIM: GUI CONFIG OPTIONS {{{
|
||||
set guicursor+=a:blinkon0 "disable the blinking cursor
|
||||
|
||||
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
|
||||
set guioptions=aegi
|
||||
"}}}
|
||||
|
|
5
vimrc
5
vimrc
|
@ -21,11 +21,14 @@
|
|||
"Powerline Font Support: (1:enabled, 0:disabled)
|
||||
let powerlinefonts=1
|
||||
|
||||
"Syntax Checking Enabled: (1:enabled, 0:must be toggled on)
|
||||
let autochecksyntax=1
|
||||
|
||||
"GVim Font Selection: (term font set by terminal)
|
||||
set guifont=Droid\ Sans\ Mono\ 12
|
||||
|
||||
"Add Config Directory: (distro-agnostic system-wide)
|
||||
set runtimepath+=/etc/vim
|
||||
set runtimepath+=/etc/vim,/etc/vim/after
|
||||
|
||||
"Load Settings:
|
||||
runtime config/settings.vim
|
||||
|
|
Loading…
Reference in a new issue