From 49a76dc1350a268b3de71ce804477df04e6a82f2 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 27 Aug 2018 17:52:10 +0200 Subject: ack, rust, and other stuff --- dotvimrc | 43 +++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/dotvimrc b/dotvimrc index 32fd275..8859d90 100644 --- a/dotvimrc +++ b/dotvimrc @@ -1,5 +1,11 @@ set nocompatible syn on + +" Because Konsole font size +" https://github.com/neovim/neovim/issues/6798 +set guicursor= + +set nocscopeverbose set ignorecase set smartcase set modeline @@ -66,11 +72,11 @@ NeoBundleFetch 'Shougo/neobundle.vim' "NeoBundle 'elixir-lang/vim-elixir' +let g:ack_default_options = " -i --vimgrep" +let g:ackprg = "rg -i --vimgrep" NeoBundle 'mileszs/ack.vim.git' -let g:ackprg = "rg" -let g:ack_default_options = " --vimgrep" -noremap a :Ack! --vimgrep -t cpp -t c -t py -noremap A :Ack! --vimgrep +noremap a :Ack! -t rust -t cpp -t c -t py +noremap A :Ack! NeoBundle 'tpope/vim-fugitive' @@ -103,6 +109,17 @@ noremap y :YcmDiags noremap Y :YcmRestartServer noremap F :YcmCompleter FixIt:ccl +let g:rust_recommended_style = 0 +NeoBundle 'rust-lang/rust.vim' + +NeoBundle 'racer-rust/vim-racer.git' +let g:racer_cmd = "/usr/bin/racer" +let g:racer_experimental_completer = 1 +let $RUST_SRC_PATH='/home/bram/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src' +au FileType rust nmap gd (rust-def) +au FileType rust nmap gD (rust-doc) +au FileType rust nmap m :make build + NeoBundle 'tpope/vim-surround.git' NeoBundle 'taglist.vim' NeoBundle 'majutsushi/tagbar' @@ -129,23 +146,19 @@ colorscheme bramwombat if has("nvim") set termguicolors - set cursorline set noincsearch elseif has("gui_running") - - if has("gui_gtk2") - set guifont="Source Code Pro Medium 12" - elseif has("gui_win32") + set guifont="Source Code Pro Medium 15" + nnoremap :call ToggleFullScreen() + if has("gui_win32") set guifont=Lucida_Console:h10:cANSI endif - - nnoremap :call ToggleFullScreen() - - set cursorline else set t_Co=256 endif +set cursorline + "set a sudo vim cmap w!! w !sudo tee % > /dev/null @@ -180,7 +193,7 @@ set statusline+=%{((exists(\"+bomb\")\ &&\ &bomb)?\"B,\":\"\")}]\ " BOM set statusline+=%{strftime('%a\ %b\ %e\ %H:%M')}\ " hour "set statusline+=%{SyntaxItem()} " syntax highlight group under cursor set statusline+=%= " right align -if !empty(glob("bundle/vim-fugitive/plugin/fugitive.vim")) +if !empty(glob("$HOME/.vim/bundle/vim-fugitive/plugin/fugitive.vim")) set statusline+=%{fugitive#statusline()}\ " git branch endif set statusline+=0x%-8B\ " current char @@ -283,6 +296,8 @@ set list set completeopt=menu,menuone,longest "let g:clang_complete_copen=1 +noremap R :cscope reset:CtrlPClearAllCaches + "some CScope maps noremap fs :cscope f s -- cgit v1.2.3