set tags=tags set tw=512 set nows " set redraw " set number relativenumber set wm=0 set tabstop=4 set shiftwidth=4 set autoindent "autocmd FileType c,cpp "set formatoptions=croql cindent set showcmd set report=0 set ignorecase " Works in vim 7.3 and up set colorcolumn=133 " set window=100 " set notimeout " Yes, * is used for something else, but... Not, any more. set nomodeline set showmode let mapleader = "*" " " Make vim's filename tab-complete more like that of bash. set wildmode=longest,list " Don't beep - instead, flash the window. set visualbell " set undofile map *1 :set ts=1 sw=1 map *2 :set ts=2 sw=2 map *3 :set ts=3 sw=3 map *4 :set ts=4 sw=4 map *5 :set ts=5 sw=5 map *6 :set ts=6 sw=6 map *7 :set ts=7 sw=7 map *8 :set ts=8 sw=8 map *9 :set ts=9 sw=9 map *br O{jo}k map *co I/* A */ map *ma :w! :!clear; make map *ww :!chmod u+w % map *un ^3x$hh3x map *ai :set autoindent map *na :set noautoindent map *ws :set wrapscan map *te !}reblock 8 65 map *nw :set nowrapscan map *if $a if True: map *ei <<$a elif: True map *el <<$a else: map *fn $a def function(): """.""" kk0wcw map *cl $a class Klass(): """.""" def __init__(self): """.""" kkkk0wcw map *ex :!chmod 755 % map *rw :!chmod 644 % map *js :%!python3 -m json.tool map *tb :TagbarToggle map *p2 :call Py2() map *p3 :call Py3() map *cr :!clear " map *gc i# COPYRIGHT NOTICES # Copyright 2015-2019 GROKSTREAM, LLC., All rights reserved. # Software Notices and other information can be found at http://www.grokstream.com/notices  set guifont=Andale\ Mono\ 12 "syntax enable syntax on ":colorscheme filetype on filetype plugin on nmap "+gP imap i vmap "+y vmap "+y set ofu=syntaxcomplete#Complete "if getline(1) =~ '^#!.*\' au BufEnter * if getline(1) =~ "^#!.*pypy.*$" | set filetype=python | endif "if getline(1) =~ '^#!.*pypy.*$' " set filetype=python "endif " Tell vim that *.ts is typscript, not xml! :-S autocmd BufNewFile,BufRead *.ts setlocal filetype=typescript au BufEnter * if getline(1) =~ "^#!.*nodejs.*$" | set filetype=javascript | endif if did_filetype() " filetype already set.. finish " ..don't do these checks endif execute pathogen#infect() " Without this, jedi-vim completion didn't appear to work on os/x let g:jedi#completions_command = "" let g:jedi#goto_command = "d" let g:jedi#goto_assignments_command = "g" let g:jedi#goto_stubs_command = "s" let g:jedi#goto_definitions_command = "" let g:jedi#documentation_command = "K" let g:jedi#usages_command = "n" let g:jedi#completions_command = "" let g:jedi#rename_command = "r" " Start Nerdtree on control-n map :NERDTreeToggle " Close vim if the only window left is a nerdtree autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif set path+=** " Wasn't recommended, but nice let g:syntastic_loc_list_height=4 " Syntastic beginner config set statusline+=%#warningmsg# " set statusline+=%{SyntasticStatuslineFlag()} set statusline+=%* let g:syntastic_always_populate_loc_list = 1 let g:syntastic_auto_loc_list = 1 let g:syntastic_check_on_open = 1 let g:syntastic_check_on_wq = 0 " pylint was too slow on large files. " let g:syntastic_python_checkers = ['pylint'] let g:syntastic_python_checkers = ['pyflakes', 'pycodestyle', 'pydocstyle'] let g:syntastic_python_pylint_post_args = "$PYLINT_ARGS" let g:syntastic_python_pycodestyle_post_args = '--max-line-len=131' let g:syntastic_python_pydocstyle_post_args = '--match=".*"' let g:syntastic_javascript_checkers=['eslint'] let g:syntastic_typescript_checkers=['tslint', 'tsc'] let g:syntastic_java_checkers=['javac'] let g:syntastic_html_checkers=['eslint', 'tidy'] let g:syntastic_check_on_open = 1 let g:syntastic_lua_checkers = ["luac", "luacheck"] let g:syntastic_lua_luacheck_args = "--no-unused-args" function Py2() let g:syntastic_python_python_exec = '/usr/bin/python' let g:syntastic_python_pylint_exec = '~/bin/my-pylint' endfunction function Py3() let g:syntastic_python_python_exec = '/usr/bin/python3' let g:syntastic_python_pylint_exec = '~/bin/my-pylint3' endfunction let g:syntastic_javascript_eslint_exe='$(npm bin --global)/eslint' let g:syntastic_html_tidy_exe='tidy' let g:syntastic_go_checkers = ['gofmt', 'golint'] " I'm told cargo is faster than rustc " " Also, cargo seems to run cargo-clippy. " " rustfmt seems kind of like pycodestyle (or autopep8?), but I had to use --force with cargo to get it installed. " It might be duplicating what clippy does - not sure. " " let g:syntastic_rust_checkers = ['rustfmt', 'cargo', 'rustc'] let g:syntastic_rust_checkers = ['cargo'] call Py3() " default to Python3 " Folding by syntax/indentation - za is your friend set foldmethod=indent set foldnestmax=10 set nofoldenable set foldlevel=1 " Sometimes without this, gvim will display underscores as blanks set linespace=5 " let g:pymode_python = 'python3' " let g:pymode_lint_checkers = ['mccabe', 'pyflakes', 'pylint', 'pep8', 'pep257'] " let g:pymode_lint_checkers = ['mccabe', 'pyflakes', 'pylint', 'pep8', 'pep257'] " let g:pymode_options_max_line_length=132 autocmd FileType python set colorcolumn=133 autocmd FileType python set expandtab autocmd FileType make set noexpandtab softtabstop=-1 autocmd FileType go set noexpandtab softtabstop=-1 " OCaml! " This is from https://github.com/ocaml/merlin/wiki/vim-from-scratch : let g:syntastic_ocaml_checkers = ['merlin'] " ## added by OPAM user-setup for vim / base ## 93ee63e278bdfc07d1139a748ed3fff2 ## you can edit, but keep this line let s:opam_share_dir = system("opam config var share") let s:opam_share_dir = substitute(s:opam_share_dir, '[\r\n]*$', '', '') let s:opam_configuration = {} function! OpamConfOcpIndent() execute "set rtp^=" . s:opam_share_dir . "/ocp-indent/vim" endfunction let s:opam_configuration['ocp-indent'] = function('OpamConfOcpIndent') function! OpamConfOcpIndex() execute "set rtp+=" . s:opam_share_dir . "/ocp-index/vim" endfunction let s:opam_configuration['ocp-index'] = function('OpamConfOcpIndex') function! OpamConfMerlin() let l:dir = s:opam_share_dir . "/merlin/vim" execute "set rtp+=" . l:dir endfunction let s:opam_configuration['merlin'] = function('OpamConfMerlin') let s:opam_packages = ["ocp-indent", "ocp-index", "merlin"] let s:opam_check_cmdline = ["opam list --installed --short --safe --color=never"] + s:opam_packages let s:opam_available_tools = split(system(join(s:opam_check_cmdline))) for tool in s:opam_packages " Respect package order (merlin should be after ocp-index) if count(s:opam_available_tools, tool) > 0 call s:opam_configuration[tool]() endif endfor " ## end of OPAM user-setup addition for vim / base ## keep this line