From 447137cd744d80f498062558c94e31c187b947eb Mon Sep 17 00:00:00 2001 From: Nick Shipp Date: Sat, 3 Jun 2017 01:07:10 -0400 Subject: Tweaks to rust cfg for vim --- .gitmodules | 6 ++++++ vim/bundle/vim-commentary | 1 + vim/bundle/vim-surround | 1 + vim/ftplugin/rust.vim | 13 ++++++------- vim/main.vim | 3 +++ 5 files changed, 17 insertions(+), 7 deletions(-) create mode 160000 vim/bundle/vim-commentary create mode 160000 vim/bundle/vim-surround diff --git a/.gitmodules b/.gitmodules index 3106d74..594a3a9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,9 @@ [submodule "vim/vim-surround"] path = vim/vim-surround url = https://github.com/tpope/vim-surround.git +[submodule "vim/bundle/vim-commentary"] + path = vim/bundle/vim-commentary + url = https://github.com/tpope/vim-commentary.git +[submodule "vim/bundle/vim-surround"] + path = vim/bundle/vim-surround + url = https://github.com/tpope/vim-surround.git diff --git a/vim/bundle/vim-commentary b/vim/bundle/vim-commentary new file mode 160000 index 0000000..be79030 --- /dev/null +++ b/vim/bundle/vim-commentary @@ -0,0 +1 @@ +Subproject commit be79030b3e8c0ee3c5f45b4333919e4830531e80 diff --git a/vim/bundle/vim-surround b/vim/bundle/vim-surround new file mode 160000 index 0000000..e49d6c2 --- /dev/null +++ b/vim/bundle/vim-surround @@ -0,0 +1 @@ +Subproject commit e49d6c2459e0f5569ff2d533b4df995dd7f98313 diff --git a/vim/ftplugin/rust.vim b/vim/ftplugin/rust.vim index 8bdfbe5..7d378b9 100644 --- a/vim/ftplugin/rust.vim +++ b/vim/ftplugin/rust.vim @@ -1,12 +1,11 @@ "" " Rust config -" TODO: Move to ftplugin " -au FileType rust nmap (rust-def) -au FileType rust nmap g (rust-def-split) -au FileType rust nmap g (rust-def-vertical) -au FileType rust nmap K (rust-doc) -au FileType rust compiler cargo -au FileType rust set formatprg=rustfmt +nmap (rust-def) +nmap g (rust-def-split) +nmap g (rust-def-vertical) +nmap K (rust-doc) +compiler cargo +setl formatexpr=rustfmt#FormatRange() " diff --git a/vim/main.vim b/vim/main.vim index 1c67e35..16251a1 100644 --- a/vim/main.vim +++ b/vim/main.vim @@ -47,6 +47,8 @@ set browsedir=buffer " :browse the current buffer's directory " TODO: set cinoptions=:0 " for C, don't indent case statements set list " turn on list mode to show invisible chars set listchars=trail:-,tab:>- " limit list to trailing whitespace and tabs +set tildeop " ~ becomes a real operator +set conceallevel=1 " conceal things if possible "" }}} "" {{{ Autocmds " :make hooks to display the quickfix window automatically @@ -125,5 +127,6 @@ vnoremap p :call Paste(visualmode()) "" {{{ etc " Slimv configuration for tmux let g:slimv_browser_cmd = 'tmux split-window -h w3m' +let g:rust_conceal = 1 "" }}} " vim:foldmethod=marker:foldlevel=0 -- cgit v1.2.3-54-g00ecf