Browse Source

Improve vim config for python and markdown

master
Taylor Bockman 8 years ago
parent
commit
1aff9f581d
  1. 8
      dotfiles/config/nvim/init.vim

8
dotfiles/config/nvim/init.vim

@ -1,7 +1,5 @@
set fileencoding=utf-8 set fileencoding=utf-8
filetype off
if empty(glob('~/.config/nvim/autoload/plug.vim')) if empty(glob('~/.config/nvim/autoload/plug.vim'))
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
@ -125,6 +123,9 @@ autocmd BufWritePre * :%s/\s\+$//e
autocmd FileType rust setlocal shiftwidth=2 tabstop=2 autocmd FileType rust setlocal shiftwidth=2 tabstop=2
autocmd BufRead,BufNewFile *.rs set filetype=rust autocmd BufRead,BufNewFile *.rs set filetype=rust
" Set column width to 80 only on python files
autocmd BufNewFile,BufRead *.py setlocal colorcolumn=80
" Disable the rust style guide recommended 4 space indentation " Disable the rust style guide recommended 4 space indentation
let g:rust_recommended_style=0 let g:rust_recommended_style=0
@ -185,6 +186,9 @@ let g:pymode_doc_key = 'K'
" Disable auto python-mode autocomplete documentation window " Disable auto python-mode autocomplete documentation window
set completeopt=menu set completeopt=menu
" Disable markdown automatic section folding
let g:vim_markdown_folding_disabled = 1
" Merlin for OCaml " Merlin for OCaml
let g:opamshare = substitute(system('opam config var share'),'\n$','','''') let g:opamshare = substitute(system('opam config var share'),'\n$','','''')
execute "set rtp+=" . g:opamshare . "/merlin/vim" execute "set rtp+=" . g:opamshare . "/merlin/vim"

Loading…
Cancel
Save