diff --git a/vim/spell/en.utf-8.add b/vim/spell/en.utf-8.add index 23eebb1..7ddc6ca 100644 --- a/vim/spell/en.utf-8.add +++ b/vim/spell/en.utf-8.add @@ -1 +1,15 @@ Gah +podcasts +blogs +mins +TFSA +Primerica +RRSP +synth +destructuring +deconstruct +metadata +ctx +playlist +API +Junos diff --git a/vim/spell/en.utf-8.add.spl b/vim/spell/en.utf-8.add.spl index 08cc195..74b2db6 100644 Binary files a/vim/spell/en.utf-8.add.spl and b/vim/spell/en.utf-8.add.spl differ diff --git a/vimrc b/vimrc index c30df06..481d099 100644 --- a/vimrc +++ b/vimrc @@ -3,6 +3,7 @@ let mapleader="," set nocompatible filetype off + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " PLUGINS """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -10,53 +11,20 @@ filetype off set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() -" Plugins go here +" Let Vundle manage itself. Plugin 'gmarik/Vundle.vim' +" Plugins +Plugin 'jpalardy/vim-slime' + " All of your Plugins must be added before the following line call vundle#end() call pathogen#infect() call pathogen#helptags() -" Run a given vim command on the results of fuzzy selecting from a given shell -" command. See usage below. -function! SelectaCommand(choice_command, selecta_args, vim_command) - try - let selection = system(a:choice_command . " | selecta " . a:selecta_args) - catch /Vim:Interrupt/ - " Swallow the ^C so that the redraw below happens; otherwise there will be - " leftovers from selecta on the screen - redraw! - return - endtry - redraw! - exec a:vim_command . " " . selection -endfunction +filetype plugin indent on -" Find all files in all non-dot directories starting in the working directory. -" Fuzzy select one of those. Open the selected file with :e. -nnoremap f :call SelectaCommand("find * -type f ! -path 'resources/public/js/*' ! -path 'resources/.sass-cache/*' ! -path 'target/*'", "", ":e") - -" # NERDtree -"nmap d :NERDTreeToggle -"nmap ff :NERDTreeFind - -" # gist-vim -let g:gist_detect_filetype = 1 -let g:gist_open_browser_after_post = 1 -let g:gist_show_privates = 1 -let g:gist_post_private = 1 - -" vim-clojure-static -let g:clojure_align_multiline_strings = 1 -" Default - let g:clojure_fuzzy_indent = 1 - let g:clojure_fuzzy_indent_patterns = ['^match', '^with', '^def', '^let'] - let g:clojure_fuzzy_indent_blacklist = ['-fn$', '\v^with-%(meta|out-str|loading-context)$'] - -" # c-tags -set tags+=tags;$HOME """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " BASIC EDITING CONFIGURATION @@ -106,7 +74,6 @@ syntax on " Use the default filetype settings, so that mail gets 'tw' set to 72, " 'cindent' is on in C files, etc. " Also load indent files, to automatically do language-dependent indenting. -filetype plugin indent on " use emacs-style tab completion when selecting files, etc set wildmenu set wildmode=longest,list,full @@ -157,16 +124,17 @@ map pn :sp ~/jelly/documents/Notes/stack.txt map sn :sp ~/jelly/documents/software-notes/clojure.md map rn :sp ~/work/dive-networks/files/notes/refactoring-notes.md -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" CLOJURE AND CLOJURESCRIPT -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" CLOJURE AND CLOJURESCRIPT SYNTAX +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Rainbow parens ala rainbow_parentheses.vim au VimEnter * RainbowParenthesesToggle au Syntax * RainbowParenthesesLoadRound au Syntax * RainbowParenthesesLoadSquare au Syntax * RainbowParenthesesLoadBraces + """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " COLORS """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -185,6 +153,7 @@ function! ChangeBgTheme(theme) exec ":RainbowParenthesesToggle" endfunction + """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " CUSTOM AUTOCMDS """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -202,14 +171,16 @@ augroup vimrcEx autocmd FileType html,eruby if g:html_indent_tags !~ '\\|p\>' | let g:html_indent_tags .= '\|p\|li\|dt\|dd' | endif " Spell check - autocmd BufRead,BufNewFile *.md setlocal spell + autocmd BufRead,BufNewFile *.md setlocal spell spelllang=en_us augroup END + """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " STATUS LINE """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" :set statusline=%<%f\ (%{&ft})\ %-4(%m%)%=%-19(%3l,%02c%03V%) + """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " MISC KEY MAPS """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -266,7 +237,7 @@ map p :set paste! paste? map o :set number! number? " Spell checking -map d :set spell! spell? +map d :exec &spell==&spell? "se spell! spelllang=en_us" : "se spell!" " Clear the search buffer (highlighting) when hitting return function! MapCR() @@ -275,6 +246,7 @@ endfunction call MapCR() nnoremap + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " ABBREVIATIONS """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -296,6 +268,7 @@ endfunction inoremap =InsertTabWrapper() inoremap + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " RENAME CURRENT FILE """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -310,6 +283,7 @@ function! RenameFile() endfunction map n :call RenameFile() + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " GREP SEARCH """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -321,6 +295,7 @@ function! Search() endfunction map s :call Search() + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " PROMOTE VARIABLE TO RSPEC LET """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -334,6 +309,7 @@ endfunction :command! PromoteToLet :call PromoteToLet() :map pl :PromoteToLet + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " RUNNING TESTS """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -391,6 +367,64 @@ function! RunTests(filename) end endfunction + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" MARKDOWN +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Use Marked.app to preview Markdown files... nnoremap pp :silent !open -a Marked.app '%:p' + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" SELECTA -- find files with fuzzy-search +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Run a given vim command on the results of fuzzy selecting from a given shell +" command. See usage below. +function! SelectaCommand(choice_command, selecta_args, vim_command) + try + let selection = system(a:choice_command . " | selecta " . a:selecta_args) + catch /Vim:Interrupt/ + " Swallow the ^C so that the redraw below happens; otherwise there will be + " leftovers from selecta on the screen + redraw! + return + endtry + redraw! + exec a:vim_command . " " . selection +endfunction + +" Find all files in all non-dot directories starting in the working directory. +" Fuzzy select one of those. Open the selected file with :e. +nnoremap f :call SelectaCommand("find * -type f ! -path 'resources/public/js/*' ! -path 'resources/.sass-cache/*' ! -path 'target/*'", "", ":e") + + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" NERDTREE +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"nmap d :NERDTreeToggle +"nmap ff :NERDTreeFind + + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" GIST VIM +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +let g:gist_detect_filetype = 1 +let g:gist_open_browser_after_post = 1 +let g:gist_show_privates = 1 +let g:gist_post_private = 1 + + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" VIM-CLOJURE-STATIC +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +let g:clojure_align_multiline_strings = 1 +" Default + let g:clojure_fuzzy_indent = 1 + let g:clojure_fuzzy_indent_patterns = ['^match', '^with', '^def', '^let'] + let g:clojure_fuzzy_indent_blacklist = ['-fn$', '\v^with-%(meta|out-str|loading-context)$'] + + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" C-TAGS +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +set tags+=tags;$HOME