From 62f96e87006019f3d0e359a8fd52007a937946c4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 28 Aug 2015 16:29:27 -0400 Subject: [PATCH] Remove minimal vim --- gvimrc | 119 ------ vim/colors/Tomorrow-Night-Eighties.vim | 470 ------------------------ vimrc | 483 ------------------------- 3 files changed, 1072 deletions(-) delete mode 100644 gvimrc delete mode 100644 vim/colors/Tomorrow-Night-Eighties.vim delete mode 100644 vimrc diff --git a/gvimrc b/gvimrc deleted file mode 100644 index fe48ff33..00000000 --- a/gvimrc +++ /dev/null @@ -1,119 +0,0 @@ -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" gvimrc " -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - -" Say neigh to UI cruft! -set go-=T -set go-=l -set go-=L -set go-=r -set go-=R -" No GUI tabs! -set go-=e -" Don't show dialogues, use text prompts -set go+=c - -" Sets File>Open to start in current file's path -set browsedir=buffer - -" Share a clipboard with OS and vim terminal sessions -if has('unnamedplus') - set clipboard=unnamedplus -else - set clipboard=unnamed -endif - -" For macvim -if has('gui_macvim') - - " j doesn't seem to work from terminal - set formatoptions+=j - - " set guifont=Ubuntu\ Mono:h14 - " set guifont=Monaco:h12 - " set guifont=Ubuntu\ Mono:h14 - set guifont=Terminus\ (TTF):h12 - set noantialias - - " Replace some CMD shortcuts - macmenu &File.Open\.\.\. key= - macmenu &Tools.Make key= - - " Switching buffers - nmap ]b - nmap [b - - " Textmate-like CMD+Enter - inoremap o - inoremap O - - " Fast scrolling - map 5j - map 5k - imap 5j - imap 5k - - " Commenting using CMD+/" - nmap gcc - vmap gc - - " Tab navigation - nmap 1gt - nmap 2gt - nmap 3gt - nmap 4gt - nmap 5gt - nmap 6gt - nmap 7gt - nmap 8gt - nmap 9gt - - map r - " Replace :make - map :Dispatch - - " Shortcuts to outside apps {{{ - " Open in finder - nnoremap f :silent !open "%:p:h" - nnoremap F :silent !open . - - " Open in terminal - nnoremap t :silent !open -a iTerm "%:p:h" - nnoremap T :silent !open -a iTerm . - - " Send to transmit - nnoremap u :silent !open -a Transmit "%" - - " Send to launchbar (project and file, respectively) - nnoremap [ :call LaunchBarSelect(expand("%:p:h")) - nnoremap ] :call LaunchBarSelect(expand("%:p")) - - func LaunchBarSelect(arg) - silent! let l:arg = substitute(a:arg, '[^A-Za-z0-9_.~-/]','\="%".printf("%02X",char2nr(submatch(0)))','g') - if l:arg ==# "" - let l:arg = expand("%:p:h") - endif - exec 'silent !open "x-launchbar:select?file=' . l:arg . '"' - endfunc - " }}} - -else - - " For unix only - inoremap * - cnoremap * - - set go-=m - set novisualbell - - " For gvim - set guifont=Monospace\ 10 - - " Commenting using Ctrl+/ - map gcc - - " Textmate-like CMD+Enter - inoremap o - inoremap O - -endif diff --git a/vim/colors/Tomorrow-Night-Eighties.vim b/vim/colors/Tomorrow-Night-Eighties.vim deleted file mode 100644 index 38182f2c..00000000 --- a/vim/colors/Tomorrow-Night-Eighties.vim +++ /dev/null @@ -1,470 +0,0 @@ -" Tomorrow Night Eighties - Full Colour and 256 Colour -" http://chriskempson.com -" -" Hex colour conversion functions borrowed from the theme "Desert256"" - -" Default GUI Colours -let s:foreground = "cccccc" -" let s:background = "2d2d2d" -let s:background = "1f1f1f" -let s:selection = "515151" -let s:line = "393939" -let s:comment = "999999" -let s:red = "f2777a" -let s:orange = "f99157" -let s:yellow = "ffcc66" -let s:green = "99cc99" -let s:aqua = "009999" -let s:blue = "99cccc" -let s:purple = "cc99cc" -let s:window = "4d5057" -let s:window_dim = "3d3e44" - -hi clear -syntax reset - -let g:colors_name = "Tomorrow-Night-Eighties" - -if has("gui_running") || &t_Co == 88 || &t_Co == 256 - " Returns an approximate grey index for the given grey level - fun grey_number(x) - if &t_Co == 88 - if a:x < 23 - return 0 - elseif a:x < 69 - return 1 - elseif a:x < 103 - return 2 - elseif a:x < 127 - return 3 - elseif a:x < 150 - return 4 - elseif a:x < 173 - return 5 - elseif a:x < 196 - return 6 - elseif a:x < 219 - return 7 - elseif a:x < 243 - return 8 - else - return 9 - endif - else - if a:x < 14 - return 0 - else - let l:n = (a:x - 8) / 10 - let l:m = (a:x - 8) % 10 - if l:m < 5 - return l:n - else - return l:n + 1 - endif - endif - endif - endfun - - " Returns the actual grey level represented by the grey index - fun grey_level(n) - if &t_Co == 88 - if a:n == 0 - return 0 - elseif a:n == 1 - return 46 - elseif a:n == 2 - return 92 - elseif a:n == 3 - return 115 - elseif a:n == 4 - return 139 - elseif a:n == 5 - return 162 - elseif a:n == 6 - return 185 - elseif a:n == 7 - return 208 - elseif a:n == 8 - return 231 - else - return 255 - endif - else - if a:n == 0 - return 0 - else - return 8 + (a:n * 10) - endif - endif - endfun - - " Returns the palette index for the given grey index - fun grey_colour(n) - if &t_Co == 88 - if a:n == 0 - return 16 - elseif a:n == 9 - return 79 - else - return 79 + a:n - endif - else - if a:n == 0 - return 16 - elseif a:n == 25 - return 231 - else - return 231 + a:n - endif - endif - endfun - - " Returns an approximate colour index for the given colour level - fun rgb_number(x) - if &t_Co == 88 - if a:x < 69 - return 0 - elseif a:x < 172 - return 1 - elseif a:x < 230 - return 2 - else - return 3 - endif - else - if a:x < 75 - return 0 - else - let l:n = (a:x - 55) / 40 - let l:m = (a:x - 55) % 40 - if l:m < 20 - return l:n - else - return l:n + 1 - endif - endif - endif - endfun - - " Returns the actual colour level for the given colour index - fun rgb_level(n) - if &t_Co == 88 - if a:n == 0 - return 0 - elseif a:n == 1 - return 139 - elseif a:n == 2 - return 205 - else - return 255 - endif - else - if a:n == 0 - return 0 - else - return 55 + (a:n * 40) - endif - endif - endfun - - " Returns the palette index for the given R/G/B colour indices - fun rgb_colour(x, y, z) - if &t_Co == 88 - return 16 + (a:x * 16) + (a:y * 4) + a:z - else - return 16 + (a:x * 36) + (a:y * 6) + a:z - endif - endfun - - " Returns the palette index to approximate the given R/G/B colour levels - fun colour(r, g, b) - " Get the closest grey - let l:gx = grey_number(a:r) - let l:gy = grey_number(a:g) - let l:gz = grey_number(a:b) - - " Get the closest colour - let l:x = rgb_number(a:r) - let l:y = rgb_number(a:g) - let l:z = rgb_number(a:b) - - if l:gx == l:gy && l:gy == l:gz - " There are two possibilities - let l:dgr = grey_level(l:gx) - a:r - let l:dgg = grey_level(l:gy) - a:g - let l:dgb = grey_level(l:gz) - a:b - let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) - let l:dr = rgb_level(l:gx) - a:r - let l:dg = rgb_level(l:gy) - a:g - let l:db = rgb_level(l:gz) - a:b - let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db) - if l:dgrey < l:drgb - " Use the grey - return grey_colour(l:gx) - else - " Use the colour - return rgb_colour(l:x, l:y, l:z) - endif - else - " Only one possibility - return rgb_colour(l:x, l:y, l:z) - endif - endfun - - " Returns the palette index to approximate the 'rrggbb' hex string - fun rgb(rgb) - let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0 - let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0 - let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0 - - return colour(l:r, l:g, l:b) - endfun - - " Sets the highlighting for the given group - fun X(group, fg, bg, attr) - if a:fg != "" - exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . rgb(a:fg) - endif - if a:bg != "" - exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . rgb(a:bg) - endif - if a:attr != "" - exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr - endif - endfun - - " Vim Highlighting - call X("Normal", s:foreground, s:background, "") - call X("LineNr", s:selection, "", "") - call X("NonText", s:selection, "", "") - call X("SpecialKey", s:selection, "", "") - call X("Search", s:background, s:yellow, "") - call X("TabLine", s:window, s:foreground, "reverse") - call X("TabLineFill", s:window, s:foreground, "reverse") - call X("StatusLine", s:window, s:yellow, "reverse") - call X("StatusLineNC", s:window_dim, s:comment, "reverse") - call X("VertSplit", s:window, s:window, "none") - call X("Visual", "", s:selection, "") - call X("Directory", s:blue, "", "") - call X("ModeMsg", s:green, "", "") - call X("MoreMsg", s:green, "", "") - call X("Question", s:green, "", "") - call X("WarningMsg", s:red, "", "") - call X("MatchParen", "", s:selection, "") - call X("Folded", s:comment, s:window_dim, "") - " call X("Folded", s:comment, s:background, "") - call X("FoldColumn", "", s:background, "") - if version >= 700 - call X("CursorLine", "", s:line, "none") - call X("CursorColumn", "", s:line, "none") - call X("PMenu", s:foreground, s:selection, "none") - call X("PMenuSel", s:foreground, s:selection, "reverse") - call X("SignColumn", "", s:background, "none") - end - if version >= 703 - call X("ColorColumn", "", s:line, "none") - end - - " Standard Highlighting - call X("Comment", s:comment, "", "") - call X("Todo", s:comment, s:background, "") - call X("Title", s:comment, "", "") - call X("Identifier", s:red, "", "none") - call X("Statement", s:foreground, "", "") - call X("Conditional", s:foreground, "", "") - call X("Repeat", s:foreground, "", "") - call X("Structure", s:purple, "", "") - call X("Function", s:blue, "", "") - call X("Constant", s:orange, "", "") - call X("String", s:green, "", "") - call X("Special", s:blue, "", "") - call X("PreProc", s:purple, "", "") - call X("Operator", s:aqua, "", "none") - call X("Type", s:blue, "", "none") - call X("Define", s:purple, "", "none") - call X("Include", s:blue, "", "") - "call X("Ignore", "666666", "", "") - - " Vim Highlighting - call X("vimCommand", s:red, "", "none") - - " C Highlighting - call X("cType", s:yellow, "", "") - call X("cStorageClass", s:purple, "", "") - call X("cConditional", s:purple, "", "") - call X("cRepeat", s:purple, "", "") - - " PHP Highlighting - call X("phpVarSelector", s:red, "", "") - call X("phpKeyword", s:purple, "", "") - call X("phpRepeat", s:purple, "", "") - call X("phpConditional", s:purple, "", "") - call X("phpStatement", s:purple, "", "") - call X("phpMemberSelector", s:foreground, "", "") - - " Ruby Highlighting - call X("rubySymbol", s:green, "", "") - call X("rubyConstant", s:yellow, "", "") - call X("rubyAccess", s:yellow, "", "") - call X("rubyAttribute", s:blue, "", "") - call X("rubyInclude", s:blue, "", "") - call X("rubyLocalVariableOrMethod", s:orange, "", "") - call X("rubyCurlyBlock", s:orange, "", "") - call X("rubyStringDelimiter", s:green, "", "") - call X("rubyInterpolationDelimiter", s:orange, "", "") - call X("rubyConditional", s:purple, "", "") - call X("rubyRepeat", s:purple, "", "") - call X("rubyControl", s:purple, "", "") - call X("rubyException", s:purple, "", "") - - " Python Highlighting - call X("pythonInclude", s:purple, "", "") - call X("pythonStatement", s:purple, "", "") - call X("pythonConditional", s:purple, "", "") - call X("pythonRepeat", s:purple, "", "") - call X("pythonException", s:purple, "", "") - call X("pythonFunction", s:blue, "", "") - call X("pythonPreCondit", s:purple, "", "") - call X("pythonRepeat", s:aqua, "", "") - call X("pythonExClass", s:orange, "", "") - - " JavaScript Highlighting - call X("javaScriptBraces", s:foreground, "", "") - call X("javaScriptFunction", s:purple, "", "") - call X("javaScriptConditional", s:purple, "", "") - call X("javaScriptRepeat", s:purple, "", "") - call X("javaScriptNumber", s:orange, "", "") - call X("javaScriptMember", s:orange, "", "") - call X("javascriptNull", s:orange, "", "") - call X("javascriptGlobal", s:blue, "", "") - call X("javascriptStatement", s:red, "", "") - - " HTML Highlighting - call X("htmlTag", s:red, "", "") - call X("htmlTagName", s:red, "", "") - call X("htmlArg", s:red, "", "") - call X("htmlScriptTag", s:red, "", "") - - " Diff Highlighting - call X("diffAdded", s:green, "", "") - call X("diffRemoved", s:red, "", "") - - " ShowMarks Highlighting - call X("ShowMarksHLl", s:orange, s:background, "none") - call X("ShowMarksHLo", s:purple, s:background, "none") - call X("ShowMarksHLu", s:yellow, s:background, "none") - call X("ShowMarksHLm", s:aqua, s:background, "none") - - " Lua Highlighting - call X("luaStatement", s:purple, "", "") - call X("luaRepeat", s:purple, "", "") - call X("luaCondStart", s:purple, "", "") - call X("luaCondElseif", s:purple, "", "") - call X("luaCond", s:purple, "", "") - call X("luaCondEnd", s:purple, "", "") - - " Cucumber Highlighting - call X("cucumberGiven", s:blue, "", "") - call X("cucumberGivenAnd", s:blue, "", "") - - " Go Highlighting - call X("goDirective", s:purple, "", "") - call X("goDeclaration", s:purple, "", "") - call X("goStatement", s:purple, "", "") - call X("goConditional", s:purple, "", "") - call X("goConstants", s:orange, "", "") - call X("goTodo", s:yellow, "", "") - call X("goDeclType", s:blue, "", "") - call X("goBuiltins", s:purple, "", "") - - " Clojure "highlighting - call X("clojureConstant", s:orange, "", "") - call X("clojureBoolean", s:orange, "", "") - call X("clojureCharacter", s:orange, "", "") - call X("clojureKeyword", s:green, "", "") - call X("clojureNumber", s:orange, "", "") - call X("clojureString", s:green, "", "") - call X("clojureRegexp", s:green, "", "") - call X("clojureParen", s:aqua, "", "") - call X("clojureVariable", s:yellow, "", "") - call X("clojureCond", s:blue, "", "") - call X("clojureDefine", s:purple, "", "") - call X("clojureException", s:red, "", "") - call X("clojureFunc", s:blue, "", "") - call X("clojureMacro", s:blue, "", "") - call X("clojureRepeat", s:blue, "", "") - call X("clojureSpecial", s:purple, "", "") - call X("clojureQuote", s:blue, "", "") - call X("clojureUnquote", s:blue, "", "") - call X("clojureMeta", s:blue, "", "") - call X("clojureDeref", s:blue, "", "") - call X("clojureAnonArg", s:blue, "", "") - call X("clojureRepeat", s:blue, "", "") - call X("clojureDispatch", s:blue, "", "") - - " Scala "highlighting - call X("scalaKeyword", s:purple, "", "") - call X("scalaKeywordModifier", s:purple, "", "") - call X("scalaOperator", s:blue, "", "") - call X("scalaPackage", s:red, "", "") - call X("scalaFqn", s:foreground, "", "") - call X("scalaFqnSet", s:foreground, "", "") - call X("scalaImport", s:purple, "", "") - call X("scalaBoolean", s:orange, "", "") - call X("scalaDef", s:purple, "", "") - call X("scalaVal", s:purple, "", "") - call X("scalaVar", s:aqua, "", "") - call X("scalaClass", s:purple, "", "") - call X("scalaObject", s:purple, "", "") - call X("scalaTrait", s:purple, "", "") - call X("scalaDefName", s:blue, "", "") - call X("scalaValName", s:foreground, "", "") - call X("scalaVarName", s:foreground, "", "") - call X("scalaClassName", s:foreground, "", "") - call X("scalaType", s:yellow, "", "") - call X("scalaTypeSpecializer", s:yellow, "", "") - call X("scalaAnnotation", s:orange, "", "") - call X("scalaNumber", s:orange, "", "") - call X("scalaDefSpecializer", s:yellow, "", "") - call X("scalaClassSpecializer", s:yellow, "", "") - call X("scalaBackTick", s:green, "", "") - call X("scalaRoot", s:foreground, "", "") - call X("scalaMethodCall", s:blue, "", "") - call X("scalaCaseType", s:yellow, "", "") - call X("scalaLineComment", s:comment, "", "") - call X("scalaComment", s:comment, "", "") - call X("scalaDocComment", s:comment, "", "") - call X("scalaDocTags", s:comment, "", "") - call X("scalaEmptyString", s:green, "", "") - call X("scalaMultiLineString", s:green, "", "") - call X("scalaUnicode", s:orange, "", "") - call X("scalaString", s:green, "", "") - call X("scalaStringEscape", s:green, "", "") - call X("scalaSymbol", s:orange, "", "") - call X("scalaChar", s:orange, "", "") - call X("scalaXml", s:green, "", "") - call X("scalaConstructorSpecializer", s:yellow, "", "") - call X("scalaBackTick", s:blue, "", "") - - " Snippet highlighting - call X("snipKeyword", s:purple, "", "") - call X("snipStart", s:yellow, "", "") - - " Shell highlighting - call X("zshVariableDef", s:orange, "", "") - call X("zshCommands", s:blue, "", "") - - - " Delete Functions - delf X - delf rgb - delf colour - delf rgb_colour - delf rgb_level - delf rgb_number - delf grey_colour - delf grey_level - delf grey_number -endif - -set background=dark diff --git a/vimrc b/vimrc deleted file mode 100644 index c47d96e9..00000000 --- a/vimrc +++ /dev/null @@ -1,483 +0,0 @@ -" VIMRC -" A minimal vimrc for remote systems. For a more comprehensive vimrc, see -" . - -set nocompatible - -let g:is_ssh = ($SSH_TTY != "") - -" Initialize NeoBundle -set rtp+=~/.vim/bundle/neobundle.vim/ -call neobundle#begin(expand('~/.vim/bundle')) -NeoBundleFetch 'Shougo/neobundle.vim' - -" Preferences {{{ - syntax on - - " Editor looks {{{ - " Disable matchit, I find it distracting - let loaded_matchparen = 1 - - if &t_Co == 8 && $TERM !~# '^linux' - set t_Co=16 - else - set t_Co=256 - endif - set background=dark - colorscheme Tomorrow-Night-Eighties - - set number " Line numbers - set showcmd " Show command issued - set fillchars=vert:¦ - set list - set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+ - set textwidth=88 - - set synmaxcol=1500 - " }}} - - " Behavior {{{ - set noeol - set autoread " Auto-update a file that's been edited externally - set nospell " No spell check, please - set visualbell " No sounds! - set backspace=indent,eol,start - set lazyredraw " Don't update screen while running macros - set hidden " Hide abandoned buffers - set shortmess+=filmnrxoOtTs - set nrformats-=octal - set fileformats+=mac - - set mouse=a - if exists('$TMUX') " Support resizing in tmux - set ttymouse=xterm2 - endif - " }}} - - " StatusBar {{{ - if has('statusline') - set laststatus=2 - set ruler " Show line/col no in statusline - set statusline=%t " tail of the filename - set statusline+=%w%h%m%r " Options - if exists('g:loaded_syntastic_plugin') - set statusline+=\ %{SyntasticStatuslineFlag()} - endif - set statusline+=%= " left/right separator - set statusline+=%y " filetype - if exists('g:loaded_fugitive') - set statusline+=\ %{fugitive#statusline()} " Git Hotness - endif - set statusline+=\ •\ - set statusline+=%c " cursor column - set statusline+=\ %l/%L " cursor line/total lines - set statusline+=\ \:%P " percent through file - endif - " }}} - - " Movement & search {{{ - set nostartofline - set sidescrolloff=5 - - set incsearch " find as you type - set hlsearch " Highlight search terms - set ignorecase " case insensitive search - set smartcase " case sensitive when uc present - set gdefault " global flag for substitute by default - - if executable('ag') - let g:ackprg = 'ag --nogroup --nocolor --column' - set grepprg=ag\ --nogroup\ --nocolor - elseif executable('ack-grep') - let g:ackprg = "ack-grep -H --nocolor --nogroup --column" - endif - " }}} - - " Text formatting {{{ - set autoindent - set shiftround - set expandtab - set shiftwidth=4 - set tabstop=4 - set softtabstop=4 - " Wrapping - set nowrap - " Backspace and cursor keys to wrap - set whichwrap=b,s,h,l,<,>,[,] - " see :h fo-table - set formatoptions=qrn1lr - " }}} - - " Folding {{{ - set foldlevel=1 - " Cleaner, readable fold headers - set foldtext=MyFoldText() - fu! MyFoldText() - let line = getline(v:foldstart) - " Lines that have been folded - let nl = v:foldend - v:foldstart + 1 - - let indent = repeat(' ', indent(v:foldstart)) - let endcol = &colorcolumn ? &colorcolumn : &textwidth - let startcol = &columns < endcol ? &columns-4 : endcol - - return indent . substitute(line,"^ *","",1) - endf - " }}} - - " Swap files, history & persistence {{{ - " No backup (that's what git is for!) and swapfiles are annoying - set nobackup - set nowritebackup - set noswapfile - if has('persistent_undo') - set undodir=~/.vim/tmp/undo - set undolevels=500 - set undoreload=500 - endif - set history=5000 - - " Preserve buffer state (cursor location, folds, etc.) - set viewdir=~/.vim/tmp/views - set viewoptions=cursor,folds,unix,slash - augroup persistence - au! - au BufWinLeave * if expand("%") != "" | silent! mkview | endif - au BufWinEnter * if expand("%") != "" | silent! loadview | endif - augroup END - " }}} - - " Omnicomplete + wild settings {{{ - set tags=./tags,./../tags,./../../tags,./../../../tags,tags - - set complete-=i - set completeopt=menu - set wildmenu " Show menu instead of auto-complete - set wildmode=list:longest,full " command completion: list - " matches -> longest common -> then - " all. - set wildignore+=*.swp,*.log,.sass-cache,.codekit-cache,config.codekit - set wildignore+=*.class,*.o,*.pyc,*.obj,*DS_Store* - " }}} - - " Automatically close the popup menu / preview window - au InsertLeave * if pumvisible() == 0|silent! pclose|endif - - " Set *.scss to ft=scss instead of css.scss - au BufRead,BufNewFile *.scss set filetype=scss - au BufRead,BufNewFile Cask set filetype=lisp -" }}} - -""""""""""""""""""""""""""""""""""""""""" -" Packages/Bundles and their settings " -""""""""""""""""""""""""""""""""""""""""" -" {{{ - NeoBundle 'goldfeld/vim-seek' - - " File search {{{ - " More powerful file searching - if executable('ag') - NeoBundle 'rking/ag.vim' - elseif executable('ack') - NeoBundle 'mileszs/ack.vim' - endif - - " Project-wide search and replace - " NeoBundle 'skwp/greplace.vim' - - NeoBundle 'christoomey/vim-tmux-navigator' - - " Netrw improvements - NeoBundle 'scrooloose/nerdtree' - let NERDTreeMinimalUI = 1 - let NERDTreeChDirMode = 2 - " let NERDTreeBookmarksFile = "$HOME/.vim/tmp/NERDtreeBookmarks" - let NERDTreeIgnore = ['\~$', '\.swo$', '\.swp$', '\.git$', '\.hg', '\.svn', '\.bzr', '\.settings', '\.project', '\.DS_Store'] - let NERDTreeShowHidden = 1 - - " Command-T, Peepopen or Goto-anything, but for vim, written in VimL - NeoBundle 'kien/ctrlp.vim' - " Ctrlp extension for jumping to functions - NeoBundle 'tacahiroy/ctrlp-funky' - " Ctrlp extension for listing git modified files - NeoBundle 'jasoncodes/ctrlp-modified.vim' - let g:ctrlp_extensions = ['tag', 'buffertag', 'funky'] - " let g:ctrlp_max_height = 10 - let g:ctrlp_cache_dir = "~/.vim/tmp/ctrlp" - let g:ctrlp_custom_ignore = { - \ 'dir': '\.(git|hg|svn|settings)$|tmp$', - \ 'file': '\.(exe|so|dll|sass-cache|classpaths|project|cache|jpg|png|gif|swf)$' - \ } - let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' - let g:ctrlp_match_window = 'bottom,order:btt,min:10,max:10,results:10' - - " Smarter buffer/tab navigation - NeoBundle "szw/vim-ctrlspace" - let g:ctrlspace_use_tabline = 1 - " }}} - - " Editing {{{ - " Extended visual mode commands, substitutes and searches - NeoBundle 'vis' - - " Auto-closes delimiters like (),{},[],etc. - NeoBundle 'Raimondi/delimitMate' - let g:delimitMate_expand_cr = 1 - let g:delimitMate_expand_space = 1 - - " HTML & CSS emmet goodness; Zen coding's successor - NeoBundle 'mattn/emmet-vim' - - " Clean way to close buffers without altering window layout - NeoBundle 'moll/vim-bbye' - - " For aligning text - NeoBundle 'godlygeek/tabular' - - " Comment out code with native comment syntax - NeoBundle 'tomtom/tcomment_vim' - let g:tcomment_types = {'blade': '{-- %s --}', 'twig': '{# %s #}'} - - " Offers some plugins better compatibility with repeat ('.') - NeoBundle 'tpope/vim-repeat' - - " Easy changing and insertion of surrounding delimiters (e.g. quotes, - " parenthesis, etc.) - NeoBundle 'tpope/vim-surround' - - " Snippets system - " if has("python") - " NeoBundle 'SirVer/ultisnips' - - " My snippets - " NeoBundle 'hlissner/vim-ultisnips-snippets' - " endif - - " One-key switching between true/false, yes/no, etc - NeoBundle 'AndrewRadev/switch.vim' - " }}} - - " Remote resources {{{ - " Visual git diffs in the gutter - NeoBundle 'airblade/vim-gitgutter' - let g:gitgutter_realtime = 0 - let g:gitgutter_eager = 0 - " }}} - - " Programming {{{ - " Running code inline for testing purposes - NeoBundle 'notalex/vim-run-live' - - if !g:is_ssh - " YCM's trouble to get working across systems, so let's - " just leave it to the systems running (mac|g)vim - if has("gui_running") - " Awesome autocompletion - NeoBundle 'Valloric/YouCompleteMe', {'build': { - \ 'mac': './install.sh --clang-completer --system-libclang', - \ 'unix': './install.sh --clang-completer' }} - " let g:ycm_autoclose_preview_window_after_insertion = 1 - let g:ycm_confirm_extra_conf = 1 - " let g:ycm_register_as_syntastic_checker = 1 - " let g:ycm_seed_identifiers_with_syntax = 0 - " let g:ycm_add_preview_to_completeopt = 1 - let g:ycm_global_ycm_extra_conf = "~/.ycm_extra_conf.py" - " let g:ycm_auto_trigger = 0 - let g:ycm_confirm_extra_conf = 0 - endif - - " Syntax checkers for a multitude of languages - NeoBundle 'scrooloose/syntastic' - let g:syntastic_auto_loc_list=0 - " let g:syntastic_quiet_messages={'level': 'warnings'} - let g:syntastic_phpcs_disable=1 - let g:syntastic_echo_current_error=1 - let g:syntastic_enable_balloons = 0 - - let g:syntastic_error_symbol = '►' - let g:syntastic_warning_symbol = '►' - - let g:syntastic_loc_list_height = 5 - let g:syntastic_mode_map = {'mode': 'active', 'active_filetypes': [], 'passive_filetypes': ['html']} - endif - " }}} - - " Syntax {{{ - " CSS/SCSS/LESS - NeoBundle 'cakebaker/scss-syntax.vim' - - " PHP - NeoBundleLazy 'StanAngeloff/php.vim', {'autoload': {'filetypes': ['php', 'blade']}} - NeoBundleLazy '2072/PHP-Indenting-for-VIm', {'autoload': {'filetypes': ['php']}} - " NeoBundleLazy 'stephpy/vim-phpdoc', {'autoload': {'filetypes': ['php']}} - - " Python - NeoBundleLazy 'klen/python-mode', {'autoload': {'filetypes': ['python']}} - - " Javascript/Node - NeoBundleLazy 'pangloss/vim-javascript', {'autoload': {'filetypes': ['javascript']}} - - " Other - NeoBundle 'tpope/vim-markdown' - " }}} - - call neobundle#end() - filetype indent plugin on -" }}} - -""""""""""""""""" -" Keymappings " -""""""""""""""""" -" {{{ - nnoremap E :CtrlP ~/.dotfiles - - " Comma get some... sorry. - let mapleader = ',' - let maplocalleader = '\' - noremap ; : - - " Trigger to preserve indentation on pastes - set pastetoggle= - " Easier than escape. Pinnacle of laziness. - imap jk - " Turn off search highlighting - noremap ? :nohlsearch - - " Emacs-esque escape - inoremap - - " Navigation {{{ - " Normalize all the navigation keys to move by row/col despite any wrapped text - noremap j gj - noremap k gk - " % matchit shortcut, but only in normal mode! - nmap % - " Easier fold toggle - nnoremap 5j - vnoremap 5j - nnoremap 5k - vnoremap 5k - - " f: Find. Also support repeating with . - nnoremap OriginalSemicolon ; - nnoremap f :call repeat#set("\Plug>OriginalSemicolon")f - nnoremap t :call repeat#set("\Plug>OriginalSemicolon")t - nnoremap F :call repeat#set("\Plug>OriginalSemicolon")F - nnoremap T :call repeat#set("\Plug>OriginalSemicolon")T - " }}} - - " Editing {{{ - nnoremap - " Insert-mode navigation - " Go to end of line - inoremap A - " Go to start of line - inoremap I - - " Make Y act consistant with C and D - nnoremap Y y$ - - " Don't leave visual mode after indenting - vnoremap < >gv - - " Textmate-like CMD+Enter (O in insert mode) - inoremap o - inoremap O - - " Enabling repeat in visual mode - vmap . :normal . - " }}} - - " Buffers {{{ - " Change CWD to current file's directory - nnoremap cd :cd %:p:h:pwd - - " Next/prev buffer - nnoremap ]b :bnext - nnoremap [b :bprevious - " }}} - - " Command {{{ - " Annoying command mistakes - com! -bang -nargs=* -complete=file E e - com! -bang -nargs=* -complete=file W w - com! -bang -nargs=* -complete=file Wq wq - com! -bang -nargs=* -complete=file WQ wq - com! -bang Wa wa - com! -bang WA wa - com! -bang Q q - com! -bang QA qa - com! -bang Qa qa - " Forget to sudo? - com! WW w !sudo tree % >/dev/null - - " Shortcuts - cnoremap ;/ =expand('%:p:h').'/' - cnoremap ;; =expand("%:t") - cnoremap ;. =expand("%:p:r") - - " Mimic shortcuts in the terminal - cnoremap - cnoremap - " }}} - - " External Tools {{{ - " Send cwd to tmux - nnoremap x :Tmux cd =expand("%:p:h") - nnoremap X :Tmux cd =expand("%:p:r") - " }}} - - " Plugins {{{ - " bufkill - nnoremap zz :Bdelete - - " CtrlP - let g:ctrlp_map = '' - " Only open CtrlP if the cwd ISN'T $HOME - nnoremap / getcwd() != $HOME ? ":CtrlPCurWD" : ":echoe 'Cannot open CtrlP in HOME'" - nnoremap . :CtrlPCurFile - nnoremap , :CtrlPBuffer - nnoremap ; :CtrlPFunky - nnoremap m :CtrlPMRU - nnoremap M :CtrlPModified - nnoremap t :CtrlPBufTag - nnoremap T :CtrlPBufTagAll - - " NERDTree - map \ :NERDTreeCWD - map . :NERDTreeFind - - " Tabularize - nmap = :Tabularize / - - " UltiSnips - let g:UltiSnipsExpandTrigger = "" - let g:UltiSnipsJumpForwardTrigger = "" - let g:UltiSnipsJumpBackwardTrigger = "" - " Ignore the default snippets so I (and others) can define their own - let g:UltiSnipsSnippetDirectories = ["snips"] - - " Emmet - imap emmet#expandAbbrIntelligent("\") - - " YCM - map g] :YcmCompleter GoToDefinitionElseDeclaration - let g:ycm_key_list_select_completion = ['', ''] - let g:ycm_key_list_previous_completion = ['', ''] - - " vim-switch - nnoremap ! :Switch - " }}} -" }}} - -""""""""""""""""""""""" -" Language settings " -""""""""""""""""""""""" -" {{{ - " 2-space indentation - autocmd FileType ruby setl ts=2 sw=2 sts=2 et -" }}} - - -" vim:set fdl=0 fdm=marker: