├── .gitignore ├── README.md ├── bundles.txt ├── quick-vim ├── screen.jpg ├── vim ├── .netrwhist ├── autoload │ └── pathogen.vim └── syntax │ └── arc.vim └── vimrc /.gitignore: -------------------------------------------------------------------------------- 1 | backup 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # quick-vim 2 | 3 | {__ 4 | {_ {__ {_ 5 | {__ {__ {__ {___{__ {__ {__ {__ {___ {__ {__ 6 | {_ {__ {__ {__{__ {__ {__ {__ {_____ {__ {__ {__ {__ {_ {__ 7 | {_ {__ {__ {__{__{__ {_{__ {__ {__ {__ {__ {_ {__ 8 | {__{__ {__ {__{__ {__ {__ {__ {_{__ {__ {__ {_ {__ 9 | {__ {__{__{__ {___{__ {__ {__ {__{___ {_ {__ 10 | {___ 11 | 12 | Portable text exiting for devs. 13 | 14 | ## the problem 15 | 16 | When software does many things it sacrifices doing one thing very well. Instead of trying to make vim a clumsy "does it all" IDE `quick-vim` is lightweight, relies on simple defaults, thusly very portable and easily repeatable text editor. 17 | 18 | ## solution 19 | 20 | - three use cases: install, upgrade, and uninstall 21 | - bash and git are the only deps 22 | - no goofy gui tty business; this is a vimrc for a vim that lives in a shell 23 | - pathogen for managing deps 24 | - bundles are limited to the simple stuff and not relearning things your shell does better: like git 25 | - no weird bundles that require re-compilation of vim or outside scripting languages 26 | - bundle config is in a plain text file stored in the root of this directory 27 | 28 | 29 | 30 | ## the bundles for me 31 | 32 | This is a portable text editor for doing dev on the run, in a shell, probably on a temporary machine, possibly drunk. Vim is surprisingly powerful stand-alone, odds are you don't *really* need a particular plugin bundle. Try to work with the stock install. You'll be surprised! And less, dependant on custom schemes. (Ironic words for a vim config project, I know.) 33 | 34 | If you do need more, you can always fork this repo, create a branch, modify the bundles.txt to your hearts desire. If you find a bundle that meets the criteria above that you think I should check out: pls send a pull request! 35 | 36 | ## usage 37 | 38 | Getting started with `quick-vim` is easy: 39 | 40 | git clone git://github.com/brianleroux/quick-vim.git 41 | cd quick-vim 42 | ./quick-vim install 43 | 44 | You can reset to the default/previous vim env simply: 45 | 46 | ./quick-vim uninstall 47 | 48 | Brute force upgrade everything: 49 | 50 | ./quick-vim upgrade 51 | 52 | And thats it. 53 | 54 | -------------------------------------------------------------------------------- /bundles.txt: -------------------------------------------------------------------------------- 1 | https://github.com/scrooloose/nerdtree.git 2 | https://github.com/tpope/vim-surround.git 3 | https://github.com/pangloss/vim-javascript.git 4 | https://github.com/jonsmithers/vim-html-template-literals.git 5 | https://github.com/plasticboy/vim-markdown.git 6 | https://github.com/jonathanfilip/vim-lucius.git 7 | https://github.com/hashivim/vim-terraform.git 8 | 9 | -------------------------------------------------------------------------------- /quick-vim: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | help () { 5 | cat< 3 | " Version: 2.0 4 | 5 | " Install in ~/.vim/autoload (or ~\vimfiles\autoload). 6 | " 7 | " For management of individually installed plugins in ~/.vim/bundle (or 8 | " ~\vimfiles\bundle), adding `call pathogen#infect()` to your .vimrc 9 | " prior to `filetype plugin indent on` is the only other setup necessary. 10 | " 11 | " The API is documented inline below. For maximum ease of reading, 12 | " :set foldmethod=marker 13 | 14 | if exists("g:loaded_pathogen") || &cp 15 | finish 16 | endif 17 | let g:loaded_pathogen = 1 18 | 19 | " Point of entry for basic default usage. Give a directory name to invoke 20 | " pathogen#runtime_append_all_bundles() (defaults to "bundle"), or a full path 21 | " to invoke pathogen#runtime_prepend_subdirectories(). Afterwards, 22 | " pathogen#cycle_filetype() is invoked. 23 | function! pathogen#infect(...) abort " {{{1 24 | let source_path = a:0 ? a:1 : 'bundle' 25 | if source_path =~# '[\\/]' 26 | call pathogen#runtime_prepend_subdirectories(source_path) 27 | else 28 | call pathogen#runtime_append_all_bundles(source_path) 29 | endif 30 | call pathogen#cycle_filetype() 31 | endfunction " }}}1 32 | 33 | " Split a path into a list. 34 | function! pathogen#split(path) abort " {{{1 35 | if type(a:path) == type([]) | return a:path | endif 36 | let split = split(a:path,'\\\@]','\\&','') 191 | endif 192 | endfunction " }}}1 193 | 194 | function! s:find(count,cmd,file,lcd) " {{{1 195 | let rtp = pathogen#join(1,pathogen#split(&runtimepath)) 196 | let file = pathogen#runtime_findfile(a:file,a:count) 197 | if file ==# '' 198 | return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'" 199 | elseif a:lcd 200 | let path = file[0:-strlen(a:file)-2] 201 | execute 'lcd `=path`' 202 | return a:cmd.' '.pathogen#fnameescape(a:file) 203 | else 204 | return a:cmd.' '.pathogen#fnameescape(file) 205 | endif 206 | endfunction " }}}1 207 | 208 | function! s:Findcomplete(A,L,P) " {{{1 209 | let sep = pathogen#separator() 210 | let cheats = { 211 | \'a': 'autoload', 212 | \'d': 'doc', 213 | \'f': 'ftplugin', 214 | \'i': 'indent', 215 | \'p': 'plugin', 216 | \'s': 'syntax'} 217 | if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0]) 218 | let request = cheats[a:A[0]].a:A[1:-1] 219 | else 220 | let request = a:A 221 | endif 222 | let pattern = substitute(request,'\'.sep,'*'.sep,'g').'*' 223 | let found = {} 224 | for path in pathogen#split(&runtimepath) 225 | let path = expand(path, ':p') 226 | let matches = split(glob(path.sep.pattern),"\n") 227 | call map(matches,'isdirectory(v:val) ? v:val.sep : v:val') 228 | call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]') 229 | for match in matches 230 | let found[match] = 1 231 | endfor 232 | endfor 233 | return sort(keys(found)) 234 | endfunction " }}}1 235 | 236 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(,'edit',,0) 237 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(,'edit',,0) 238 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(,'edit',,1) 239 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(,'split',,1) 240 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(,'vsplit',,1) 241 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(,'tabedit',,1) 242 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(,'pedit',,1) 243 | command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(,'read',,1) 244 | 245 | " vim:set ft=vim ts=8 sw=2 sts=2: 246 | -------------------------------------------------------------------------------- /vim/syntax/arc.vim: -------------------------------------------------------------------------------- 1 | syntax region arcAppSection start=/\v\@app/ skip=/\v\\./ end="\v\@=" 2 | syntax region arcHtmlSection start=/\v\@http/ skip=/\v\\./ end="\v\@=" 3 | syntax region arcJsonSection start=/\v\@queues/ skip=/\v\\./ end="\v\@=" 4 | syntax region arcJsonSection start=/\v\@static/ skip=/\v\\./ end="\v\@=" 5 | syntax region arcJsonSection start=/\v\@domain/ skip=/\v\\./ end="\v\@=" 6 | syntax region arcJsonSection start=/\v\@aws/ skip=/\v\\./ end="\v\@=" 7 | syntax region arcJsonSection start=/\v\@ws/ skip=/\v\\./ end="\v\@=" 8 | syntax region arcEventsSection start=/\v\@events/ skip=/\v\\./ end="\v\@=" 9 | syntax region arcTablesSection start=/\v\@tables/ skip=/\v\\./ end="\v\@=" 10 | syntax region arcIndexesSection start=/\v\@tables-indexes/ skip=/\v\\./ end="\v\@=" 11 | syntax region arcIndexesSection start=/\v\@indexes/ skip=/\v\\./ end="\v\@=" 12 | syntax region arcScheduledSection start=/\v\@scheduled/ skip=/\v\\./ end="\v\@=" 13 | syntax region arcScheduledSection start=/\v\@cdn/ skip=/\v\\./ end="\v\@=" 14 | syntax region arcScheduledSection start=/\v\@plugins/ skip=/\v\\./ end="\v\@=" 15 | 16 | syntax match Comments "\v#.*$" 17 | syntax match HTTP "\vget|post|put|patch|delete|any" 18 | syntax match URL "\v\/\S+|\/" 19 | 20 | "highlight Normal ctermfg=47 21 | highlight link Comments Comment 22 | highlight HTTP ctermfg=72 ctermbg=NONE cterm=NONE 23 | highlight URL ctermfg=47 ctermbg=NONE cterm=NONE 24 | 25 | highlight arcAppSection ctermfg=35 26 | highlight arcHtmlSection ctermfg=35 27 | highlight arcJsonSection ctermfg=35 28 | highlight arcEventsSection ctermfg=35 29 | highlight arcTablesSection ctermfg=35 30 | highlight arcIndexesSection ctermfg=35 31 | highlight arcScheduledSection ctermfg=35 32 | -------------------------------------------------------------------------------- /vimrc: -------------------------------------------------------------------------------- 1 | call pathogen#infect() 2 | syntax on 3 | filetype plugin indent on 4 | set nofoldenable 5 | set nocompatible 6 | set nobackup 7 | set nowb 8 | set noswapfile 9 | set ic 10 | set mouse=a 11 | 12 | " syntax highligting 13 | syntax enable 14 | colorscheme lucius 15 | LuciusDark 16 | 17 | " add arcfile support 18 | au BufRead,BufNewFile *.arc set filetype=arc 19 | 20 | " make subshell way more obvs 21 | let $DGREY="\e[0;36m" 22 | let $ENDCOLOR="\e[0m" 23 | let $PS1="$DGREY#! $ENDCOLOR" 24 | 25 | " get rid of the VertSplit | uglyness 26 | set fillchars+=vert:\ 27 | hi VertSplit ctermbg=NONE 28 | 29 | " hide the status message bar 30 | set noshowmode 31 | set noruler 32 | set laststatus=0 33 | set noshowcmd 34 | 35 | " quiet pls 36 | set visualbell t_vb= 37 | 38 | " 2 space softabs default 39 | set expandtab 40 | set ts=2 41 | set sw=2 42 | 43 | " reset leader 44 | let maplocalleader = "," 45 | 46 | " :Toggle the nerdtree 47 | " \+n toggles the nerdtree 48 | " ,+n toggles the nerdtree 49 | command Toggle NERDTreeToggle 50 | map n :Toggle 51 | map n :Toggle 52 | 53 | " hide the annoying Press ? for help in NerdTree 54 | let NERDTreeIgnore = ['node_modules'] " show with 'f' 55 | let NERDTreeMinimalUI = 1 56 | let NERDTreeDirArrows = 1 57 | hi NERDTreeFile ctermfg=darkgrey ctermbg=none cterm=none 58 | 59 | " no need to fold things in markdown all the time 60 | let g:vim_markdown_folding_disabled = 1 61 | --------------------------------------------------------------------------------