├── .gitignore ├── setup_vim.sh ├── .gitmodules └── vimrc /.gitignore: -------------------------------------------------------------------------------- 1 | .netrwhist 2 | /backup 3 | -------------------------------------------------------------------------------- /setup_vim.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim 4 | cp ./vimrc ~/.vim/vimrc 5 | ln ~/.vimrc ~/.vim/vimrc 6 | vim +PluginInstall +qall 7 | 8 | echo "dont forget to install / update YoucompleteMe" 9 | echo "https://github.com/j1z0/dotfiles.git" 10 | 11 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "bundle/fugitive"] 2 | path = bundle/fugitive 3 | url = http://github.com/tpope/vim-fugitive.git 4 | [submodule "bundle/nerdtree"] 5 | path = bundle/nerdtree 6 | url = https://github.com/scrooloose/nerdtree.git 7 | [submodule "bundle/nerdtree-tabs"] 8 | path = bundle/nerdtree-tabs 9 | url = https://github.com/jistr/vim-nerdtree-tabs.git 10 | [submodule "bundle/vim-colors-solarized"] 11 | path = bundle/vim-colors-solarized 12 | url = https://github.com/altercation/vim-colors-solarized.git 13 | [submodule "bundle/vim-flake8"] 14 | path = bundle/vim-flake8 15 | url = https://github.com/nvie/vim-flake8.git 16 | [submodule "bundle/markdown-preview"] 17 | path = bundle/markdown-preview 18 | url = https://github.com/mkitt/markdown-preview.vim.git 19 | [submodule "bundle/vim_instant-markdown"] 20 | path = bundle/vim_instant-markdown 21 | url = https://github.com/suan/vim-instant-markdown.git 22 | -------------------------------------------------------------------------------- /vimrc: -------------------------------------------------------------------------------- 1 | "vundle 2 | set nocompatible 3 | filetype off 4 | 5 | set rtp+=~/.vim/bundle/Vundle.vim 6 | call vundle#begin() 7 | 8 | Plugin 'VundleVim/Vundle.vim' 9 | "git interface 10 | Plugin 'tpope/vim-fugitive' 11 | "filesystem 12 | Plugin 'scrooloose/nerdtree' 13 | Plugin 'jistr/vim-nerdtree-tabs' 14 | Plugin 'kien/ctrlp.vim' 15 | 16 | "html 17 | " isnowfy only compatible with python not python3 18 | Plugin 'isnowfy/python-vim-instant-markdown' 19 | Plugin 'jtratner/vim-flavored-markdown' 20 | Plugin 'suan/vim-instant-markdown' 21 | Plugin 'nelstrom/vim-markdown-preview' 22 | "python sytax checker 23 | Plugin 'nvie/vim-flake8' 24 | Plugin 'vim-scripts/Pydiction' 25 | Plugin 'vim-scripts/indentpython.vim' 26 | Plugin 'scrooloose/syntastic' 27 | 28 | "auto-completion stuff 29 | "Plugin 'klen/python-mode' 30 | Plugin 'Valloric/YouCompleteMe' 31 | Plugin 'klen/rope-vim' 32 | "Plugin 'davidhalter/jedi-vim' 33 | Plugin 'ervandew/supertab' 34 | ""code folding 35 | Plugin 'tmhedberg/SimpylFold' 36 | 37 | "Colors!!! 38 | Plugin 'altercation/vim-colors-solarized' 39 | Plugin 'jnurmine/Zenburn' 40 | 41 | call vundle#end() 42 | 43 | filetype plugin indent on " enables filetype detection 44 | let g:SimpylFold_docstring_preview = 1 45 | 46 | "autocomplete 47 | let g:ycm_autoclose_preview_window_after_completion=1 48 | 49 | "custom keys 50 | let mapleader=" " 51 | map g :YcmCompleter GoToDefinitionElseDeclaration 52 | " 53 | call togglebg#map("") 54 | "colorscheme zenburn 55 | "set guifont=Monaco:h14 56 | 57 | let NERDTreeIgnore=['\.pyc$', '\~$'] "ignore files in NERDTree 58 | 59 | "I don't like swap files 60 | set noswapfile 61 | 62 | "turn on numbering 63 | set nu 64 | 65 | "python with virtualenv support 66 | py << EOF 67 | import os.path 68 | import sys 69 | import vim 70 | if 'VIRTUA_ENV' in os.environ: 71 | project_base_dir = os.environ['VIRTUAL_ENV'] 72 | sys.path.insert(0, project_base_dir) 73 | activate_this = os.path.join(project_base_dir,'bin/activate_this.py') 74 | execfile(activate_this, dict(__file__=activate_this)) 75 | EOF 76 | 77 | "it would be nice to set tag files by the active virtualenv here 78 | ":set tags=~/mytags "tags for ctags and taglist 79 | "omnicomplete 80 | autocmd FileType python set omnifunc=pythoncomplete#Complete 81 | 82 | "------------Start Python PEP 8 stuff---------------- 83 | " Number of spaces that a pre-existing tab is equal to. 84 | au BufRead,BufNewFile *py,*pyw,*.c,*.h set tabstop=4 85 | 86 | "spaces for indents 87 | au BufRead,BufNewFile *.py,*pyw set shiftwidth=4 88 | au BufRead,BufNewFile *.py,*.pyw set expandtab 89 | au BufRead,BufNewFile *.py set softtabstop=4 90 | 91 | " Use the below highlight group when displaying bad whitespace is desired. 92 | highlight BadWhitespace ctermbg=red guibg=red 93 | 94 | " Display tabs at the beginning of a line in Python mode as bad. 95 | au BufRead,BufNewFile *.py,*.pyw match BadWhitespace /^\t\+/ 96 | " Make trailing whitespace be flagged as bad. 97 | au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/ 98 | 99 | " Wrap text after a certain number of characters 100 | au BufRead,BufNewFile *.py,*.pyw, set textwidth=100 101 | 102 | " Use UNIX (\n) line endings. 103 | au BufNewFile *.py,*.pyw,*.c,*.h set fileformat=unix 104 | 105 | " Set the default file encoding to UTF-8: 106 | set encoding=utf-8 107 | 108 | " For full syntax highlighting: 109 | let python_highlight_all=1 110 | syntax on 111 | 112 | " Keep indentation level from previous line: 113 | autocmd FileType python set autoindent 114 | 115 | " make backspaces more powerfull 116 | set backspace=indent,eol,start 117 | 118 | 119 | "Folding based on indentation: 120 | autocmd FileType python set foldmethod=indent 121 | "use space to open folds 122 | nnoremap za 123 | "----------Stop python PEP 8 stuff-------------- 124 | 125 | "js stuff" 126 | autocmd FileType javascript setlocal shiftwidth=2 tabstop=2 127 | --------------------------------------------------------------------------------