Kyle P Davis 9 роки тому
коміт
01536c2d44
3 змінених файлів з 194 додано та 0 видалено
  1. 87 0
      .ctags
  2. 18 0
      .gitignore
  3. 89 0
      .vimrc

+ 87 - 0
.ctags

@@ -0,0 +1,87 @@
+--exclude=*.min.js
+--exclude=node_modules
+
+--langdef=JavaScript
+--langmap=JavaScript:.js
+--regex-JavaScript=/([A-Za-z0-9._$]+)[ \t]*[:=][ \t]*\{/\1/,object/
+--regex-JavaScript=/([A-Za-z0-9._$()]+)[ \t]*[:=][ \t]*function[ \t]*\(/\1/,function/
+--regex-JavaScript=/function[ \t]+([A-Za-z0-9._$]+)[ \t]*\(([^)])\)/\1/,function/
+--regex-JavaScript=/([A-Za-z0-9._$]+)[ \t]*[:=][ \t]*\[/\1/,array/
+--regex-JavaScript=/([^= ]+)[ \t]*=[ \t]*[^"]'[^']*/\1/,string/
+--regex-JavaScript=/([^= ]+)[ \t]*=[ \t]*[^']"[^"]*/\1/,string/
+
+--langdef=CoffeeScript
+--langmap=CoffeeScript:.coffee
+--regex-CoffeeScript=/^[ \t]*(@?[a-zA-Z$_\.0-9]+)[ \t]*(=|\:)[ \t]*(\(.*\))?[ \t]*(-|=)>/\1/f,function/
+--regex-CoffeeScript=/^[ \t]*([a-zA-Z$_0-9]+\:\:[a-zA-Z$_\.0-9]+)[ \t]*(=|\:)[ \t]*(\(.*\))?[ \t]*(-|=)>/\1/f,function/
+--regex-CoffeeScript=/^[ \t]*describe[ \t]"(.+)"[ \t]*,[ \t]+[-=]>/\1/f,function/
+--regex-CoffeeScript=/^[ \t]*describe[ \t]'(.+)'[ \t]*,[ \t]+[-=]>/\1/f,function/
+--regex-CoffeeScript=/^[ \t]*it[ \t]"([^"]+)"[ \t]*,[ \t]+[-=]>/\1/f,function/
+--regex-CoffeeScript=/^[ \t]*it[ \t]'([^']+)'[ \t]*,[ \t]+[-=]>/\1/f,function/
+--regex-CoffeeScript=/^[ \t]*f+describe[ \t]"(.+)"[ \t]*,[ \t]+[-=]>/focused\: \1/f,function/
+--regex-CoffeeScript=/^[ \t]*f+describe[ \t]'(.+)'[ \t]*,[ \t]+[-=]>/focused: \1/f,function/
+--regex-CoffeeScript=/^[ \t]*f+it[ \t]"([^"]+)"[ \t]*,[ \t]+[-=]>/focused: \1/f,function/
+--regex-CoffeeScript=/^[ \t]*f+it[ \t]'([^']+)'[ \t]*,[ \t]+[-=]>/focused: \1/f,function/
+--regex-CoffeeScript=/^[ \t]*xdescribe[ \t]"(.+)"[ \t]*,[ \t]+[-=]>/disabled\: \1/f,function/
+--regex-CoffeeScript=/^[ \t]*xdescribe[ \t]'(.+)'[ \t]*,[ \t]+[-=]>/disabled: \1/f,function/
+--regex-CoffeeScript=/^[ \t]*xit[ \t]"([^"]+)"[ \t]*,[ \t]+[-=]>/disabled: \1/f,function/
+--regex-CoffeeScript=/^[ \t]*xit[ \t]'([^']+)'[ \t]*,[ \t]+[-=]>/disabled: \1/f,function/
+--regex-CoffeeScript=/^[ \t]*class[ \t]*([a-zA-Z$_\.0-9]+)[ \t]*/\1/f,function/
+
+--langdef=Css
+--langmap=Css:.css
+--langmap=Css:+.less
+--langmap=Css:+.scss
+--regex-Css=/^[ \t]*(.+)[ \t]*\{/\1/f,function/
+--regex-Css=/^[ \t]*(.+)[ \t]*,[ \t]*$/\1/f,function/
+
+--langdef=Sass
+--langmap=Sass:.sass
+--regex-Sass=/^[ \t]*([#.]*[a-zA-Z_0-9]+)[ \t]*$/\1/f,function/
+
+--langdef=Less
+--langmap=Less:.less
+--regex-Less=/^[ t]*.([A-Za-z0-9_-]+)/1/c,class,classes/
+--regex-Less=/^[ t]*#([A-Za-z0-9_-]+)/1/i,id,ids/
+--regex-Less=/^[ t]*(([A-Za-z0-9_-]+[ tn,]+)+){/1/t,tag,tags/
+--regex-Less=/^[ t]*@medias+([A-Za-z0-9_-]+)/1/m,media,medias/
+
+--langdef=Yaml
+--langmap=Yaml:.yaml
+--langmap=Yaml:+.yml
+--regex-Yaml=/^[ \t]*([a-zA-Z_0-9 ]+)[ \t]*\:[ \t]*/\1/f,function/
+
+--regex-Html=/^[ \t]*<([a-zA-Z]+)[ \t]*.*>/\1/f,function/
+
+--langdef=Markdown
+--langmap=Markdown:.md
+--langmap=Markdown:+.markdown
+--langmap=Markdown:+.mdown
+--langmap=Markdown:+.mkd
+--langmap=Markdown:+.mkdown
+--langmap=Markdown:+.ron
+--regex-Markdown=/^#+[ \t]*([^#]+)/\1/f,function/
+
+--langdef=Json
+--langmap=Json:.json
+--regex-Json=/^[ \t]*"([^"]+)"[ \t]*\:/\1/f,function/
+
+--langdef=Cson
+--langmap=Cson:.cson
+--langmap=Cson:+.gyp
+--regex-Cson=/^[ \t]*'([^']+)'[ \t]*\:/\1/f,function/
+--regex-Cson=/^[ \t]*"([^"]+)"[ \t]*\:/\1/f,function/
+--regex-Cson=/^[ \t]*([^'"]+)[ \t]*\:/\1/f,function/
+
+--langmap=C++:+.mm
+
+--langmap=Ruby:+(Rakefile)
+
+--langmap=Php:+.module
+
+--langdef=Go
+--langmap=Go:.go
+--regex-Go=/func([ \t]+\([^)]+\))?[ \t]+([a-zA-Z0-9_]+)/\2/f,func/
+--regex-Go=/var[ \t]+([a-zA-Z_][a-zA-Z0-9_]+)/\1/v,var/
+--regex-Go=/type[ \t]+([a-zA-Z_][a-zA-Z0-9_]+)/\1/t,type/
+

+ 18 - 0
.gitignore

@@ -0,0 +1,18 @@
+!.gitkeep
+
+# node
+/node_modules
+npm-debug.log
+
+# bower
+/public/bower_components/
+
+# IDE files
+/.idea
+/.settings.xml
+/.settings
+/.c9revisions/
+
+# misc files
+*.sw?
+.DS_Store

+ 89 - 0
.vimrc

@@ -0,0 +1,89 @@
+" essentials
+syntax on
+set ruler
+set bg=dark
+set mouse=a
+set nocompatible
+set bs=2
+set hlsearch
+set nowrap
+
+" tabs and indents
+set shiftwidth=4 tabstop=4 softtabstop=4
+set list lcs=tab:\⦚\  " pretty indent guides when using tabs
+highlight SpecialKey ctermfg=darkgray guifg=#424242
+
+" tab based indention behaviors
+vmap <Tab> >
+nmap <Tab> >>
+vmap <S-Tab> <
+nmap <S-Tab> <<
+imap <S-Tab> <Esc><<i
+
+" coping to Mac OS X clipboard (kinda)
+vmap <C-c> :w !pbcopy<CR><CR>
+
+" force syntax on a few file types
+autocmd BufNewFile,BufRead *.json set ft=javascript
+autocmd BufNewFile,BufRead *.md set ft=markdown
+
+" run js-beautify with the = key
+autocmd FileType javascript setlocal equalprg=js-beautify\ -f\ -\ -q\ -t\ -j\ -w\ 140\ --good-stuff
+
+" VIM-PLUG PLUGINS (WITH FIRST-RUN AUTOINSTALL)
+let PLUG_VIM_FILE = expand('~/.vim/autoload/plug.vim')
+let HAS_PLUG = filereadable(PLUG_VIM_FILE)
+if !HAS_PLUG
+	silent !mkdir -p ~/.vim/autoload
+	silent !curl -fLo ~/.vim/autoload/plug.vim https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
+endif
+call plug#begin()
+
+Plug 'bling/vim-airline'  " more helpful tab line and status lines with colors
+let g:airline#extensions#tabline#enabled = !has('gui_running')
+let g:airline#extensions#tabline#show_buffers = 0
+set laststatus=2
+set ttimeoutlen=50
+"TODO: decide if I care enough for:  https://github.com/Lokaltog/powerline-fonts
+
+Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }  " tree file browser
+map <C-n> :NERDTreeToggle<CR>
+map <C-\> :NERDTreeToggle<CR>
+"TODO: detect SHIFT?: map <Shift><C-\> :NERDTreeFind<CR>
+
+Plug 'scrooloose/syntastic'  " multi-language syntax checker
+
+Plug 'ntpeters/vim-better-whitespace'  " whitespace!!
+let g:strip_whitespace_on_save = 1
+let g:better_whitespace_filetypes_blacklist=['conque_term']
+
+Plug 'nathanaelkane/vim-indent-guides'  " pretty indent guides with softtabs
+let g:indent_guides_guide_size = 1
+
+Plug 'lilydjwg/colorizer'  " colorize CSS inline
+
+Plug 'kien/ctrlp.vim'  " fuzzy file matcher / opener
+
+Plug 'fisadev/vim-ctrlp-cmdpalette'  " fuzzy command matcher / runner
+"TODO: detect SHIFT?: map <Shift><C-p> :CtrlPCmdPalette<CR>
+
+Plug 'tpope/vim-fugitive'  " git commands and statusline
+
+Plug 'mhinz/vim-signify'  " label VCS changes in gutter
+
+Plug 'oplatek/Conque-Shell'  " a shell in a buffer
+let g:ConqueTerm_ReadUnfocused = 1
+let g:ConqueTerm_InsertOnEnter = 1
+let g:ConqueTerm_CloseOnEnd = 1
+
+Plug 'moll/vim-node'  " nodejs extras
+
+Plug 'sidorares/node-vim-debugger'  " nodejs debugger
+command NodeDebug call conque_term#open('node ' . expand('~/.vim/plugged/node-vim-debugger/bin/vim-inspector') . ' "' . expand('%') . '"', ['belowright split'])
+
+call plug#end()
+if !HAS_PLUG
+	:PlugInstall
+	silent !cd ~/.vim/plugged/node-vim-debugger/ && npm install
+	:source ~/.vimrc
+endif