Created
July 6, 2019 13:50
-
-
Save rchatsiri/c78996afe2afbf1ec3e6786331b625ac to your computer and use it in GitHub Desktop.
Vim profile for github
This file contains hidden or 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 nu | |
set encoding=utf-8 | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" et the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' | |
" The following are examples of different formats supported. | |
" Keep Plugin commands between vundle#begin/end. | |
" plugin on GitHub repo | |
Plugin 'https://github.com/Valloric/YouCompleteMe.git' | |
Plugin 'https://github.com/vim-scripts/The-NERD-tree.git' | |
Plugin 'https://github.com/vim-airline/vim-airline.git' | |
Plugin 'vim-airline/vim-airline-themes' | |
" Support Rust | |
Plugin 'rust-lang/rust.vim' | |
Plugin 'prabirshrestha/async.vim' | |
Plugin 'prabirshrestha/vim-lsp' | |
Plugin 'prabirshrestha/asyncomplete.vim' | |
Plugin 'prabirshrestha/asyncomplete-lsp.vim' | |
" Install L9 and avoid a Naming conflict if you've already installed a | |
" different version somewhere else. | |
" Plugin 'ascenator/L9', {'name': 'newL9'} | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
nnoremap <silent> <c-n> :NERDTreeToggle<cr> | |
" map move split windows | |
:map <leader>j <C-W>w | |
" Save file | |
map <F4> :w <CR> | |
" Tab navigation like Firefox. | |
nmap <leader>k :bnext<CR> | |
nmap <leader>l :bprevious<CR> | |
" format cpp file. | |
nmap <F5> :!./formatt_code.sh '%:p'<CR> | |
" delete recovery file | |
nmap <F7> :!rm '%:p:h'/.'%:t'.swp <CR> | |
" Delete whitespace | |
autocmd BufWritePre * %s/\s\+$//e | |
let g:airline#extensions#tabline#enabled = 1 | |
" auto brackets | |
inoremap " ""<left> | |
inoremap ' ''<left> | |
inoremap ( ()<left> | |
inoremap [ []<left> | |
inoremap { {}<left> | |
inoremap {<CR> {<CR>}<ESC>O | |
inoremap {;<CR> {<CR>};<ESC>O |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment