Last active
March 16, 2019 19:10
-
-
Save CynicalApe/0768745a0acd2bc4b334c1a12cb2308c to your computer and use it in GitHub Desktop.
My vimrc file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim/ | |
call vundle#begin('~/.vim/bundle/') | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'jiangmiao/auto-pairs' | |
Plugin 'scrooloose/nerdcommenter' | |
Plugin 'flazz/vim-colorschemes' | |
Plugin 'xolox/vim-misc' | |
Plugin 'xolox/vim-session' | |
Plugin 'rhysd/vim-clang-format' | |
Plugin 'rust-lang/rust.vim' | |
Plugin 'prabirshrestha/async.vim' | |
Plugin 'prabirshrestha/vim-lsp' | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
"Put your non-Plugin stuff after this line | |
"show existing tab with 4 spaces" | |
""when indenting with '>' use 4 spaces width" | |
set tabstop=4 | |
map <C-n> :NERDTreeToggle<CR> | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif | |
""Using the clipbard as the default register" | |
set clipboard=unnamedplus | |
colorscheme candyman | |
syntax on | |
map <f2> :!ctags -R . <cr> | |
map <f9> :!./run.sh <cr> | |
map <f5> :!make && ./run.sh <cr> | |
map <c-f5> :!make <cr> | |
nmap <S-Enter> o<Esc> | |
nnoremap <f12> :w <cr> <c-]> | |
nnoremap <c--> <c-o> | |
nnoremap d "_d | |
vnoremap d "_d | |
map <delete> d | |
noremap <f3> :set list! <CR> | |
set guifont=Monospace\ 12 | |
set guioptions-=m "remove menu bar | |
set guioptions-=T "remove toolbar | |
set guioptions-=r "remove right-hand scroll bar | |
set guioptions-=L "remove left-hand scroll bar | |
set guioptions-=e | |
set guicursor=n-v-c:block-Cursor | |
set guicursor+=i:ver100-iCursor | |
set guicursor+=n-v-c:blinkon0 | |
set guicursor+=i:blinkwait10 | |
set wildmenu | |
set wildmode=list:longest,full | |
set encoding=utf-8 | |
set guiheadroom=0 | |
set timeout timeoutlen=1499 | |
set incsearch | |
set autoindent | |
set backspace=indent,eol,start | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set number | |
set foldmethod=syntax | |
set listchars=trail:~ | |
highlight Cursor guifg=black guibg=green | |
highlight iCursor guifg=white guibg=steelblue | |
let g:session_directory ="~/.vim/session" | |
let g:session_autoload="no" | |
let g:session_autosave="no" | |
let g:session_command_aliases=1 | |
let g:ycm_global_ycm_extra_conf = '.ycm_extra_conf.py' | |
let g:ycm_confirm_extra_conf = 1 | |
let g:clang_format#detect_style_file = 1 | |
let g:rustfmt_autosave = 1 | |
let g:rustfmt_command = 'rustup run stable rustfmt' | |
autocmd FileType cpp ClangFormatAutoEnable | |
" << LSP >> {{{ | |
" if you want it to turn on automatically | |
let g:LanguageClient_autoStart = 1 | |
let g:LanguageClient_serverCommands = { | |
\ 'rust': ['rustup', 'run', 'nightly', 'rls'], | |
\ 'go': ['go-langserver'] } | |
noremap <silent> H :call LanguageClient_textDocument_hover()<CR> | |
noremap <silent> Z :call LanguageClient_textDocument_definition()<CR> | |
noremap <silent> R :call LanguageClient_textDocument_rename()<CR> | |
noremap <silent> S :call LanugageClient_textDocument_documentSymbol()<CR> | |
" }}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment