mirror of
https://github.com/prurigro/darkcloud-nvimconfig.git
synced 2024-11-09 15:06:38 -05:00
Tweaked the colors and styling of the cursor line/col and visual selection to better differentiate between the two. Changed the match parenthesis to standout with black text so the colour is based on the syntax instead of sometimes becoming invisble when the colours match. Changed the emmit shortcut from <Ctrl-Y> to <Ctrl-Z> for reach, and because it's easier to remember (zencoding). Tweaked some of the keyboard references so their explanation makes it easier to remember the keys. Removed the multiple cursors plugin as it rarely worked, was buggy when it did and would slow things down when accidentally triggered. Chanced read sudo from :rsudo to :esudo to match the usual load command in vim, :e. Emmit is now only initialized in css, html, php and aspx files (feel free to push additional webdev files that would be likely to have css or html). Tried to apply a more consistant style and better organization across the configs. Lowered the distance from the edge of the screen before scrolling and increased the undo history size. Removed the perl omnicompletion script because I was looking to trim things down and don't really use perl myself; my apologies if anyone does though, and you can easily get it back by cloning https://github.com/c9s/perlomni.vim.git into the bundle directory. I also remove the fugitive git plugin because while I do use git, I've just found it to be easier and more natural to run it from outside vim; fans of that one can get it back by cloning https://github.com/tpope/vim-fugitive.git into the bundle directory
This commit is contained in:
parent
ad161ecf5d
commit
47f3047a8a
9 changed files with 162 additions and 197 deletions
9
.gitmodules
vendored
9
.gitmodules
vendored
|
@ -1,6 +1,3 @@
|
|||
[submodule "vim/bundle/vim-multiple-cursors"]
|
||||
path = vim/bundle/vim-multiple-cursors
|
||||
url = https://github.com/terryma/vim-multiple-cursors.git
|
||||
[submodule "vim/bundle/SudoEdit.vim"]
|
||||
path = vim/bundle/SudoEdit.vim
|
||||
url = https://github.com/vim-scripts/SudoEdit.vim.git
|
||||
|
@ -34,9 +31,6 @@
|
|||
[submodule "vim/bundle/neocomplcache.vim"]
|
||||
path = vim/bundle/neocomplcache.vim
|
||||
url = https://github.com/Shougo/neocomplcache.vim.git
|
||||
[submodule "vim/bundle/vim-fugitive"]
|
||||
path = vim/bundle/vim-fugitive
|
||||
url = https://github.com/tpope/vim-fugitive.git
|
||||
[submodule "vim/bundle/emmet-vim"]
|
||||
path = vim/bundle/emmet-vim
|
||||
url = https://github.com/mattn/emmet-vim.git
|
||||
|
@ -46,6 +40,3 @@
|
|||
[submodule "vim/bundle/nerdtree"]
|
||||
path = vim/bundle/nerdtree
|
||||
url = https://github.com/scrooloose/nerdtree.git
|
||||
[submodule "vim/bundle/perlomni.vim"]
|
||||
path = vim/bundle/perlomni.vim
|
||||
url = https://github.com/c9s/perlomni.vim.git
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 72610878e4107ada46d3e87c3a85001064439814
|
||||
Subproject commit 9b80875e074eeb0ee2ed637876d1b91d54733dd2
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 60b39ac6cd59ff14022fc024f1f0a7121a93c952
|
|
@ -1 +0,0 @@
|
|||
Subproject commit f395f3cbeaa353ff1545c3c8f86b2fef65003592
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 35028be1f71953da9f2c28509bf6c5ebd1d31c28
|
|
@ -276,16 +276,16 @@ call s:X("Normal","bcbcbc","262626","","White",s:termBlack)
|
|||
call s:X("Pmenu","87d7ff","303030","","Grey","LightBlue")
|
||||
call s:X("PmenuSel","87d7ff","4e4e4e","bold","White","Black")
|
||||
|
||||
call s:X("CursorLine","","3a3a3a","bold","",s:termBlack)
|
||||
call s:X("CursorLine","","303030","","",s:termBlack)
|
||||
call s:X("CursorLineNr","000000","87d7ff","bold",s:termBlack,"Blue")
|
||||
call s:X("CursorColumn","","3a3a3a","","",s:termBlack)
|
||||
call s:X("MatchParen","","87d7ff","bold","","Blue")
|
||||
call s:X("CursorColumn","","303030","","",s:termBlack)
|
||||
call s:X("MatchParen","","000000","standout","","000000")
|
||||
|
||||
call s:X("TabLine","","000000","","",s:termBlack)
|
||||
call s:X("TabLineFill","","000000","","",s:termBlack)
|
||||
call s:X("TabLineSel","000000","ffffff","",s:termBlack,"White")
|
||||
|
||||
call s:X("Visual","","3a3a3a","","",s:termBlack)
|
||||
call s:X("Visual","","3a3a3a","bold","",s:termBlack)
|
||||
call s:X("Cursor","000000","ffff00","underline",s:termBlack,"Yellow")
|
||||
|
||||
call s:X("LineNr","ffaf00","","","Red","")
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
"==========================="
|
||||
" "
|
||||
" Keyboard Configuration: "
|
||||
" "
|
||||
"==========================="
|
||||
"
|
||||
" Reference: (view plugin documentation for the full list of commands each offers)
|
||||
" <Ctrl-y>, | (A) -> follows an emme term to expand it (ie: 'html:5')
|
||||
" <Ctrl-z>, | (A) -> follows an emme term to expand it (ie: 'html:5')
|
||||
" <Leader><F2> | (N) -> toggle hexhighlight's hexcode to colours in :gui
|
||||
" cs'" | (N) -> replace surrounding '' with "" (other delims work)
|
||||
" cs"<q> | (N) -> replace surrounding "" with <q></q> tags
|
||||
" cst" | (N) -> replace any tag (ie: <q></q>) with quotes
|
||||
" ds | (N) -> removes delimiters
|
||||
" <Ctrl-n> | (N) -> mark for multiple cursors, or select the next match
|
||||
" 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:
|
||||
" <Leader><n> | (A) -> go to the next open tab
|
||||
|
@ -28,14 +25,6 @@
|
|||
" <Leader><C-f> | (N) -> format document and return to current line
|
||||
" <Leader><C-w> | (N) -> remove whitespace
|
||||
"
|
||||
" (git-fugitive)
|
||||
" <Leader>G | (N) -> Git : view the menu
|
||||
" <Leader>gc | (N) -> Gcommit : make a commit
|
||||
" <Leader>gd | (N) -> Gdiff * : show differences since the last commit
|
||||
" <Leader>ge | (N) -> Gedit : edit the git metadata
|
||||
" <Leader>gl | (N) -> Glog : view the commit and differences log
|
||||
" <Leader>gs | (N) -> Gstatus : view status info about the git repo
|
||||
"
|
||||
" (neocomplcache)
|
||||
" <Tab> | (I) -> write the part common to all suggestions
|
||||
" <Backspace> | (I) -> cancle the match dialog (during suggestion)
|
||||
|
@ -47,95 +36,88 @@
|
|||
" <Ctrl-F12> | (A) -> toggle the scrollbar
|
||||
"
|
||||
" Aliases:
|
||||
" :mc | (N) -> :MultipleCursorsFind (multiple cursors via regex)
|
||||
" :wsudo | (N) -> :SudoWrite (write the file as root using sudo)
|
||||
" :rsudo | (N) -> :SudoRead (read a file as root using sudo)
|
||||
" :esudo | (N) -> :SudoRead (read a file as root using sudo)
|
||||
"
|
||||
" Notes:
|
||||
" *by the default <Leader> key is: \
|
||||
"
|
||||
|
||||
"==========="
|
||||
" Mappings: "
|
||||
"==========="
|
||||
"tab and untabbing selected blocks
|
||||
vmap <Tab> >gv
|
||||
vmap <S-Tab> <gv
|
||||
"MAPPINGS: GENERAL KEYBINDINGS AND REBINDINGS {{{
|
||||
"tab and untabbing selected blocks
|
||||
vmap <Tab> >gv
|
||||
vmap <S-Tab> <gv
|
||||
|
||||
"move to the next and previous tabs
|
||||
nnoremap <silent><expr> <Leader>n ':tabn<CR>'
|
||||
nnoremap <silent><expr> <Leader>p ':tabp<CR>'
|
||||
"move to the next and previous tabs
|
||||
nnoremap <silent><expr> <Leader>n ':tabn<CR>'
|
||||
nnoremap <silent><expr> <Leader>p ':tabp<CR>'
|
||||
|
||||
"toggle the nerd tree sidebar
|
||||
nnoremap <silent><expr> <F1> ':NERDTree<CR>'
|
||||
"toggle the cursor line and column
|
||||
nnoremap <silent><expr> <F3> ':set cursorline! cursorcolumn!<CR>'
|
||||
|
||||
"toggle the tagbar sidebar
|
||||
nnoremap <silent><expr> <F2> ':TagbarToggle<CR>'
|
||||
"toggle the display of line numbers
|
||||
nnoremap <silent><expr> <F4> ':set number!<CR>'
|
||||
|
||||
"toggle the cursor line and column
|
||||
nnoremap <silent><expr> <F3> ':set cursorline! cursorcolumn!<CR>'
|
||||
"toggle line wrapping (and bottom bar if using the gui)
|
||||
if !has("gui_running")
|
||||
nnoremap <silent><expr> <F5> ':set wrap!<CR>'
|
||||
else
|
||||
nnoremap <silent><expr> <F5> ':set wrap! go'.'-+'[&wrap]."=b\r"
|
||||
endif
|
||||
|
||||
"toggle the display of line numbers
|
||||
nnoremap <silent><expr> <F4> ':set number!<CR>'
|
||||
"toggle the display of whitespace
|
||||
nnoremap <silent><expr> <F6> ':set list!<CR>'
|
||||
|
||||
"toggle line wrapping (and bottom bar if using the gui)
|
||||
if !has("gui_running")
|
||||
nnoremap <silent><expr> <F5> ':set wrap!<CR>'
|
||||
else
|
||||
nnoremap <silent><expr> <F5> ':set wrap! go'.'-+'[&wrap]."=b\r"
|
||||
endif
|
||||
"toggle folded code at foldpoints
|
||||
inoremap <F12> <C-O>za
|
||||
nnoremap <F12> za
|
||||
onoremap <F12> <C-C>za
|
||||
vnoremap <F12> zf
|
||||
|
||||
"toggle the display of whitespace
|
||||
nnoremap <silent><expr> <F6> ':set list!<CR>'
|
||||
"format document then return to current line
|
||||
nnoremap <Leader><C-f> mzgg=G`z<CR>
|
||||
|
||||
"toggle folded code at foldpoints
|
||||
inoremap <F12> <C-O>za
|
||||
nnoremap <F12> za
|
||||
onoremap <F12> <C-C>za
|
||||
vnoremap <F12> zf
|
||||
"remove trailing white space
|
||||
nnoremap <silent><expr> <Leader><C-w> ':FixWhitespace<CR>'
|
||||
|
||||
"format document then return to current line
|
||||
nnoremap <Leader><C-f> mzgg=G`z<CR>
|
||||
"map shift to enable middle-click paste while being held
|
||||
map <S-Insert> <MiddleMouse>
|
||||
map! <S-Insert> <MiddleMouse>
|
||||
"}}}
|
||||
|
||||
"remove trailing white space
|
||||
nnoremap <silent><expr> <Leader><C-w> ':FixWhitespace<CR>'
|
||||
"PLUGIN KEYBINDINGS {{{
|
||||
"toggle the nerd tree sidebar
|
||||
nnoremap <silent><expr> <F1> ':NERDTree<CR>'
|
||||
|
||||
"various git fugitive functions
|
||||
nnoremap <silent><expr> <Leader>G ':Git<CR>'
|
||||
nnoremap <silent><expr> <Leader>gc ':Gcommit<CR>'
|
||||
nnoremap <silent><expr> <Leader>gd ':Gdiff *<CR>'
|
||||
nnoremap <silent><expr> <Leader>ge ':Gedit<CR>'
|
||||
nnoremap <silent><expr> <Leader>gl ':Glog<CR>'
|
||||
nnoremap <silent><expr> <Leader>gs ':Gstatus<CR>'
|
||||
"toggle the tagbar sidebar
|
||||
nnoremap <silent><expr> <F2> ':TagbarToggle<CR>'
|
||||
|
||||
"neocomplcache suggestions: cancel, autocomplete, scroll up and scroll down
|
||||
inoremap <expr><Tab> pumvisible() ? neocomplcache#complete_common_string() : "\<Tab>"
|
||||
inoremap <expr><Backspace> pumvisible() ? neocomplcache#close_popup() : "\<Backspace>"
|
||||
inoremap <expr><Leader><Backspace> neocomplcache#undo_completion()
|
||||
"neocomplcache suggestions: cancel, autocomplete, scroll up and scroll down
|
||||
inoremap <expr><Tab> pumvisible() ? neocomplcache#complete_common_string() : "\<Tab>"
|
||||
inoremap <expr><Backspace> pumvisible() ? neocomplcache#close_popup() : "\<Backspace>"
|
||||
inoremap <expr><Leader><Backspace> neocomplcache#undo_completion()
|
||||
|
||||
"compatibility hack for proper keyboard config in screen/tmux
|
||||
if $TERM =~ '^screen-256color'
|
||||
nmap <Esc>OH <Home>
|
||||
imap <Esc>OH <Home>
|
||||
nmap <Esc>OF <End>
|
||||
imap <Esc>OF <End>
|
||||
endif
|
||||
"emmet switch triggerkey from <Ctrl-Y> to <Ctrl-Z>
|
||||
let g:user_emmet_leader_key='<C-Z>'
|
||||
"}}}
|
||||
|
||||
"================"
|
||||
" GVim Mappings: "
|
||||
"================"
|
||||
"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-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>"
|
||||
"TMUX AND SCREEN COMPATIBILITY: SOME HACKS TO MAKE THINGS WORK RIGHT {{{
|
||||
if $TERM =~ '^screen-256color'
|
||||
nmap <Esc>OH <Home>
|
||||
imap <Esc>OH <Home>
|
||||
nmap <Esc>OF <End>
|
||||
imap <Esc>OF <End>
|
||||
endif
|
||||
"}}}
|
||||
|
||||
"enable middle-click paste while holding shift
|
||||
map <S-Insert> <MiddleMouse>
|
||||
map! <S-Insert> <MiddleMouse>
|
||||
"GVIM: MAPPINGS FOR GUI ELEMENTS {{{
|
||||
"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-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>"
|
||||
"}}}
|
||||
|
||||
"=========="
|
||||
" Aliases: "
|
||||
"=========="
|
||||
cabbrev mc MultipleCursorsFind
|
||||
cabbrev wsudo SudoWrite
|
||||
cabbrev rsudo SudoRead
|
||||
"ALIASES: COMMAND SHORTCUTS {{{
|
||||
cabbrev wsudo SudoWrite
|
||||
cabbrev esudo SudoRead
|
||||
"}}}
|
||||
|
|
|
@ -1,22 +1,25 @@
|
|||
"=========================="
|
||||
" "
|
||||
" Plugins Configuration: "
|
||||
" "
|
||||
"=========================="
|
||||
|
||||
"PATHOGEN BUNDLED EXTENSIONS PLUGIN: LOAD BUNDLED PLUGINS {{{"
|
||||
execute pathogen#infect()
|
||||
"}}}
|
||||
|
||||
"EMMET: CONFIGURE WHEN ZENCODING IS ENABLED {{{
|
||||
let g:user_emmet_install_global = 0
|
||||
autocmd FileType html,css,php,aspx EmmetInstall
|
||||
"}}}
|
||||
|
||||
"NEOCOMPLCACHE AUTOCOMPLETION PLUGIN: ENABLE, CONFIG AND SETUP OMNICOMPLETION {{{"
|
||||
let g:neocomplcache_enable_at_startup = 1
|
||||
let g:neocomplcache_enable_smart_case = 1
|
||||
let g:neocomplcache_min_syntax_length = 3
|
||||
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
|
||||
let g:neocomplcache_wildcard_characters = {'_': '-'}
|
||||
let g:neocomplcache_enable_insert_char_pre=1
|
||||
let g:neocomplcache_enable_underbar_completion=1
|
||||
let g:neocomplcache_enable_camel_case_completion=1
|
||||
let g:neocomplcache_wildcard_characters={'_': '-'}
|
||||
|
||||
if has("autocmd") && exists("+omnifunc")
|
||||
autocmd Filetype * if &omnifunc == "" | setlocal omnifunc=syntaxcomplete#Complete | endif
|
||||
|
@ -28,9 +31,9 @@
|
|||
autocmd FileType ruby set omnifunc=rubycomplete#Complete
|
||||
autocmd FileType php setlocal omnifunc=phpcomplete#CompletePHP
|
||||
|
||||
if !exists('g:neocomplcache_omni_patterns') | let g:neocomplcache_omni_patterns = {} | endif
|
||||
let g:neocomplcache_omni_patterns.c = '[^.[:digit:] *\t]\%(\.\|->\)'
|
||||
let g:neocomplcache_omni_patterns.cpp = '[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::'
|
||||
if !exists('g:neocomplcache_omni_patterns') | let g:neocomplcache_omni_patterns={} | endif
|
||||
let g:neocomplcache_omni_patterns.c='[^.[:digit:] *\t]\%(\.\|->\)'
|
||||
let g:neocomplcache_omni_patterns.cpp='[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::'
|
||||
let g:neocomplcache_omni_patterns.xml='<[^>]*'
|
||||
let g:neocomplcache_omni_patterns.html='<[^>]*'
|
||||
let g:neocomplcache_omni_patterns.xhtml='<[^>]*'
|
||||
|
@ -38,18 +41,17 @@
|
|||
let g:neocomplcache_omni_patterns.css='^\s\+\w+\|\w+[):;]?\s\+\|[@!]'
|
||||
let g:neocomplcache_omni_patterns.less='^\s\+\w+\|\w+[):;]?\s\+\|[@!]'
|
||||
let g:neocomplcache_omni_patterns.javascript='[^. \t]\.\%(\h\w*\)\?'
|
||||
let g:neocomplcache_omni_patterns.python = '[^. *\t]\.\h\w*\|\h\w*::'
|
||||
let g:neocomplcache_omni_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::'
|
||||
let g:neocomplcache_omni_patterns.php = '[^. \t]->\h\w*\|\h\w*::'
|
||||
|
||||
let g:neocomplcache_omni_patterns.actionscript = '[^. \t][.:]\h\w*'
|
||||
let g:neocomplcache_omni_patterns.python3 = '[^. *\t]\.\h\w*\|\h\w*::'
|
||||
let g:neocomplcache_omni_patterns.go = '\h\w*\%.'
|
||||
let g:neocomplcache_omni_patterns.perl = '\h\w*->\h\w*\|\h\w*::'
|
||||
let g:neocomplcache_omni_patterns.java = '\%(\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.vimshell= '\%(\\[^[:alnum:].-]\|[[:alnum:]@/.-_+,#$%~=*]\)\{2,}'
|
||||
let g:neocomplcache_omni_patterns.python='[^. *\t]\.\h\w*\|\h\w*::'
|
||||
let g:neocomplcache_omni_patterns.ruby='[^. *\t]\.\w*\|\h\w*::'
|
||||
let g:neocomplcache_omni_patterns.php='[^. \t]->\h\w*\|\h\w*::'
|
||||
let g:neocomplcache_omni_patterns.actionscript='[^. \t][.:]\h\w*'
|
||||
let g:neocomplcache_omni_patterns.python3='[^. *\t]\.\h\w*\|\h\w*::'
|
||||
let g:neocomplcache_omni_patterns.go='\h\w*\%.'
|
||||
let g:neocomplcache_omni_patterns.perl='\h\w*->\h\w*\|\h\w*::'
|
||||
let g:neocomplcache_omni_patterns.java='\%(\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.vimshell='\%(\\[^[:alnum:].-]\|[[:alnum:]@/.-_+,#$%~=*]\)\{2,}'
|
||||
"}}}
|
||||
|
||||
"ASPNET ABSHIRE SYNTAX PLUGIN: {{{
|
||||
|
|
|
@ -1,82 +1,75 @@
|
|||
"==============================="
|
||||
" "
|
||||
" Vim Settings Configuration: "
|
||||
" "
|
||||
"==============================="
|
||||
|
||||
"================"
|
||||
" Compatibility: "
|
||||
"================"
|
||||
set nocompatible "enable vim specific capabilities"
|
||||
set lazyredraw "only redraw what needs to be redrawn"
|
||||
set encoding=utf-8 "set encoding"
|
||||
set fileformats=unix,dos,mac "set compatible line endings in order of preference"
|
||||
"COMPATIBILITY SETTINGS: DOCUMENT AND ENVIRONMENT SETTINGS {{{
|
||||
set nocompatible "enable vim specific capabilities"
|
||||
set lazyredraw "only redraw what needs to be redrawn"
|
||||
set encoding=utf-8 "set encoding"
|
||||
set fileformats=unix,dos,mac "set compatible line endings in order of preference"
|
||||
|
||||
if $TERM =~ '^linux'
|
||||
set t_Co=8 "use 8 colours when a vterm is detected
|
||||
elseif !has("gui_running")
|
||||
set t_Co=256 "assume 256 colours when any other terminal is detected
|
||||
endif
|
||||
if $TERM =~ '^linux'
|
||||
set t_Co=8 "use 8 colours when a vterm is detected
|
||||
elseif !has("gui_running")
|
||||
set t_Co=256 "assume 256 colours when any other terminal is detected
|
||||
endif
|
||||
"}}}
|
||||
|
||||
"========="
|
||||
" Syntax: "
|
||||
"========="
|
||||
filetype plugin indent on
|
||||
syntax on "turn syntax highlighting on
|
||||
set foldmethod=syntax foldcolumn=1 foldlevel=8 "configure how folding code works
|
||||
"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
|
||||
"}}}
|
||||
|
||||
"============"
|
||||
" Filetypes: "
|
||||
"============"
|
||||
au BufNewFile,BufRead *.txt set spell "enable spellcheck for text files (*.txt)
|
||||
au BufNewFile,BufRead *tmux.conf setf sh "set syntax for *tmux.conf to sh (bash)
|
||||
au BufNewFile,BufRead pacman.conf setf sh "set syntax for *tmux.conf to sh (bash)
|
||||
au BufNewFile,BufRead yaourtrc setf sh "set syntax for *tmux.conf to sh (bash)
|
||||
au BufNewFile,BufRead cjdroute.conf setf javascript "set syntax for *cjdroute.conf to javascript
|
||||
au BufNewFile,BufRead ircd.conf setf javascript "set syntax for *ircd.conf to javascript
|
||||
"FILETYPES: SETTINGS SPECIFIC TO A FILETYPE {{{
|
||||
au BufNewFile,BufRead *.txt set spell "enable spellcheck for text files (*.txt)
|
||||
au BufNewFile,BufRead *tmux.conf setf sh "set syntax for *tmux.conf to sh (bash)
|
||||
au BufNewFile,BufRead pacman.conf setf sh "set syntax for *tmux.conf to sh (bash)
|
||||
au BufNewFile,BufRead yaourtrc setf sh "set syntax for *tmux.conf to sh (bash)
|
||||
au BufNewFile,BufRead cjdroute.conf setf javascript "set syntax for *cjdroute.conf to javascript
|
||||
au BufNewFile,BufRead ircd.conf setf javascript "set syntax for *ircd.conf to javascript
|
||||
"}}}
|
||||
|
||||
"=========="
|
||||
" General: "
|
||||
"=========="
|
||||
set cursorline cursorcolumn "enable row/column highlighting
|
||||
set splitright "add new tiles on the right (and not left) when added
|
||||
set scrolloff=5 sidescrolloff=5 "how many vertical and horizontal characters left before scrolling
|
||||
set number "enable line numbers
|
||||
set list listchars=tab:>-,trail:- "display whitespace
|
||||
set nowrap "disable line wrapping
|
||||
set autochdir "current dir is file dir
|
||||
set backspace=indent,eol,start "enables backspacing
|
||||
set history=60 "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 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
|
||||
set matchtime=5 "the amount of time the matching bracket will highlight
|
||||
set smarttab expandtab autoindent tabstop=4 shiftwidth=4 "configure tabs
|
||||
set laststatus=2 showcmd statusline=%F%m%r%h%w[%L][%{&ff}]%y[%p%%][%04l,%04v] "statusline init and config
|
||||
set hlsearch incsearch ignorecase smartcase "configure search
|
||||
"GENERAL: ANYTHING THAT DOESN'T FIT ELSEWHERE {{{
|
||||
set cursorline cursorcolumn "enable row/column highlighting
|
||||
set splitright "add new tiles on the right (and not left) when added
|
||||
set scrolloff=3 sidescrolloff=3 "how many vertical and horizontal characters left before scrolling
|
||||
set number "enable line numbers
|
||||
set list listchars=tab:>-,trail:- "display whitespace
|
||||
set nowrap "disable line wrapping
|
||||
set autochdir "current dir is file dir
|
||||
set backspace=indent,eol,start "enables backspacing
|
||||
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 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
|
||||
set matchtime=5 "the amount of time the matching bracket will highlight
|
||||
set smarttab expandtab autoindent tabstop=4 shiftwidth=4 "configure tabs
|
||||
set laststatus=2 showcmd statusline=%F%m%r%h%w[%L][%{&ff}]%y[%p%%][%04l,%04v] "statusline init and config
|
||||
set hlsearch incsearch ignorecase smartcase "configure search
|
||||
|
||||
"load the system version of matchit if another hasn't already been
|
||||
if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# ''
|
||||
runtime! macros/matchit.vim
|
||||
endif
|
||||
"load the system version of matchit if another hasn't already been
|
||||
if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# ''
|
||||
runtime! macros/matchit.vim
|
||||
endif
|
||||
|
||||
"enable menu tab completion, configure its behaviour and set configure suffixes to reduce priority for and ignore"
|
||||
set completeopt=longest,menuone
|
||||
set wildmenu
|
||||
set wildmode=list:longest
|
||||
set wildignore=*.dll,*.o,*.obj,*.bak,*.exe,*.pyc,*.jpg,*.gif,*.png
|
||||
set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
|
||||
"enable menu tab completion, configure its behaviour and set configure suffixes to reduce priority for and ignore"
|
||||
set completeopt=longest,menuone
|
||||
set wildmenu
|
||||
set wildmode=list:longest,full
|
||||
set wildignore=*.dll,*.o,*.obj,*.bak,*.exe,*.pyc,*.jpg,*.gif,*.png
|
||||
set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
|
||||
"}}}
|
||||
|
||||
"=================="
|
||||
" GVim GUI Config: "
|
||||
"=================="
|
||||
set guioptions-=T "remove the toolbar
|
||||
"GVIM: GUI CONFIG OPTIONS {{{
|
||||
set guioptions-=T "remove the toolbar
|
||||
|
||||
if &wrap
|
||||
set go-=b "disable the bottom scrollbar iff text wrapping is enabled
|
||||
else
|
||||
set go+=b "enable the bottom scrollbar iff text wrapping is disabled
|
||||
endif
|
||||
if &wrap
|
||||
set go-=b "disable the bottom scrollbar iff text wrapping is enabled
|
||||
else
|
||||
set go+=b "enable the bottom scrollbar iff text wrapping is disabled
|
||||
endif
|
||||
"}}}
|
||||
|
|
Loading…
Reference in a new issue