From ddeb101b0f54e0752f53f754f464d96ffd639dc5 Mon Sep 17 00:00:00 2001 From: Vladan Popovic Date: Sun, 25 Aug 2019 19:16:48 +0200 Subject: [PATCH] Autoload language configuration from ftplugin --- .vim/ftplugin/python.vim | 12 ++++++++++++ .vim/ftplugin/rust.vim | 5 +++++ .vim/rust.vim | 5 ----- .vim/vimrc | 3 +-- .vim/vundlerc.vim | 6 +++++- 5 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 .vim/ftplugin/python.vim create mode 100644 .vim/ftplugin/rust.vim delete mode 100644 .vim/rust.vim diff --git a/.vim/ftplugin/python.vim b/.vim/ftplugin/python.vim new file mode 100644 index 0000000..f9a572c --- /dev/null +++ b/.vim/ftplugin/python.vim @@ -0,0 +1,12 @@ +" Enable folding on indent +set foldmethod=indent +set foldlevel=99 + +au BufNewFile,BufRead *.py + \ set tabstop=4 + \ set softtabstop=4 + \ set shiftwidth=4 + \ set textwidth=79 + \ set expandtab + \ set autoindent + \ set fileformat=unix diff --git a/.vim/ftplugin/rust.vim b/.vim/ftplugin/rust.vim new file mode 100644 index 0000000..c759f56 --- /dev/null +++ b/.vim/ftplugin/rust.vim @@ -0,0 +1,5 @@ +nmap gd (rust-def) +nmap gs (rust-def-split) +nmap gx (rust-def-vertical) +nmap gd (rust-doc) +set number diff --git a/.vim/rust.vim b/.vim/rust.vim deleted file mode 100644 index 528fda7..0000000 --- a/.vim/rust.vim +++ /dev/null @@ -1,5 +0,0 @@ -autocmd FileType rust nmap gd (rust-def) -autocmd FileType rust nmap gs (rust-def-split) -autocmd FileType rust nmap gx (rust-def-vertical) -autocmd FileType rust nmap gd (rust-doc) -autocmd FileType rust set number diff --git a/.vim/vimrc b/.vim/vimrc index 5ab9988..b6769d3 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -60,7 +60,6 @@ set exrc " Disable unsafe commands in project vimrc set secure -" Plugin/language configuration -source ~/.vim/rust.vim +" Plugin configuration source ~/.vim/ale.vim source ~/.vim/nerdtree.vim diff --git a/.vim/vundlerc.vim b/.vim/vundlerc.vim index a3aba1a..4ad652a 100644 --- a/.vim/vundlerc.vim +++ b/.vim/vundlerc.vim @@ -18,11 +18,15 @@ Plugin 'scrooloose/nerdtree' Plugin 'derekwyatt/vim-scala' let g:scala_scaladoc_indent = 1 +" Elm Plugin 'elmcast/elm-vim' +" Rust Plugin 'rust-lang/rust.vim' Plugin 'racer-rust/vim-racer' " Rust Language Server +" RST Plugin 'Rykka/riv.vim' " rst formatter and highlighter - +" Python +Plugin 'vim-scripts/indentpython.vim' " Async Lint Engine Plugin 'w0rp/ale'