summaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim')
m---------vim/bundle/vim-commentary0
m---------vim/bundle/vim-surround0
-rw-r--r--vim/ftplugin/rust.vim13
-rw-r--r--vim/main.vim3
4 files changed, 9 insertions, 7 deletions
diff --git a/vim/bundle/vim-commentary b/vim/bundle/vim-commentary
new file mode 160000
+Subproject be79030b3e8c0ee3c5f45b4333919e4830531e8
diff --git a/vim/bundle/vim-surround b/vim/bundle/vim-surround
new file mode 160000
+Subproject e49d6c2459e0f5569ff2d533b4df995dd7f9831
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 <C-]> <Plug>(rust-def)
-au FileType rust nmap g<C-]> <Plug>(rust-def-split)
-au FileType rust nmap g<S-C-]> <Plug>(rust-def-vertical)
-au FileType rust nmap K <Plug>(rust-doc)
-au FileType rust compiler cargo
-au FileType rust set formatprg=rustfmt
+nmap <buffer> <C-]> <Plug>(rust-def)
+nmap <buffer> g<C-]> <Plug>(rust-def-split)
+nmap <buffer> g<S-C-]> <Plug>(rust-def-vertical)
+nmap <buffer> K <Plug>(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 <leader>p <esc>:call Paste(visualmode())<CR>
"" {{{ 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