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:
Kevin 2014-03-11 03:05:09 -04:00
parent ad161ecf5d
commit 47f3047a8a
9 changed files with 162 additions and 197 deletions

9
.gitmodules vendored
View file

@ -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

View file

@ -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","")

View file

@ -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,17 +36,14 @@
" <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: "
"==========="
"MAPPINGS: GENERAL KEYBINDINGS AND REBINDINGS {{{
"tab and untabbing selected blocks
vmap <Tab> >gv
vmap <S-Tab> <gv
@ -66,12 +52,6 @@ vmap <S-Tab> <gv
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 tagbar sidebar
nnoremap <silent><expr> <F2> ':TagbarToggle<CR>'
"toggle the cursor line and column
nnoremap <silent><expr> <F3> ':set cursorline! cursorcolumn!<CR>'
@ -100,42 +80,44 @@ nnoremap <Leader><C-f> mzgg=G`z<CR>
"remove trailing white space
nnoremap <silent><expr> <Leader><C-w> ':FixWhitespace<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>'
"map shift to enable middle-click paste while being held
map <S-Insert> <MiddleMouse>
map! <S-Insert> <MiddleMouse>
"}}}
"PLUGIN KEYBINDINGS {{{
"toggle the nerd tree sidebar
nnoremap <silent><expr> <F1> ':NERDTree<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()
"compatibility hack for proper keyboard config in screen/tmux
"emmet switch triggerkey from <Ctrl-Y> to <Ctrl-Z>
let g:user_emmet_leader_key='<C-Z>'
"}}}
"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
"}}}
"================"
" GVim Mappings: "
"================"
"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>"
"}}}
"enable middle-click paste while holding shift
map <S-Insert> <MiddleMouse>
map! <S-Insert> <MiddleMouse>
"=========="
" Aliases: "
"=========="
cabbrev mc MultipleCursorsFind
"ALIASES: COMMAND SHORTCUTS {{{
cabbrev wsudo SudoWrite
cabbrev rsudo SudoRead
cabbrev esudo SudoRead
"}}}

View file

@ -1,13 +1,16 @@
"=========================="
" "
" 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
@ -41,7 +44,6 @@
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*\%.'

View file

@ -1,12 +1,8 @@
"==============================="
" "
" Vim Settings Configuration: "
" "
"==============================="
"================"
" Compatibility: "
"================"
"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"
@ -17,36 +13,33 @@ if $TERM =~ '^linux'
elseif !has("gui_running")
set t_Co=256 "assume 256 colours when any other terminal is detected
endif
"}}}
"========="
" Syntax: "
"========="
"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: "
"============"
"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: "
"=========="
"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=5 sidescrolloff=5 "how many vertical and horizontal characters left before scrolling
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=60 "undo history
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
@ -66,13 +59,12 @@ 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 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: "
"=================="
"GVIM: GUI CONFIG OPTIONS {{{
set guioptions-=T "remove the toolbar
if &wrap
@ -80,3 +72,4 @@ if &wrap
else
set go+=b "enable the bottom scrollbar iff text wrapping is disabled
endif
"}}}