Skip to content

Instantly share code, notes, and snippets.

@SiqingYu SiqingYu/.vimrc
Created Jul 17, 2019

Embed
What would you like to do?
.vimrc
" Turn on line numbering
set number
" rebuild the index just by pressing the <F5> key
nnoremap <f5> :!ctags -R<CR>
" Automatically Execute ctags Each Time a File is Saved
" Issue: This causes Vim to freeze when exiting
" autocmd BufWritePost * call system("ctags -R")
" Easy Expansion of the Active File Directory
cnoremap <expr> %% getcmdtype() == ':' ? expand('%:h').'/' : '%%'
" enable netrw plugin
set nocompatible
filetype plugin on
set nocompatible " be iMproved, required
filetype off " required
" Vundle
" set 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'
Plugin 'davidhalter/jedi-vim'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
" Set Konsole tab title
set title
" https://shapeshed.com/vim-netrw/
" The tree list view in netrw.
let g:netrw_liststyle = 3
" Right splitting
let g:netrw_altv = 1
" Removing the banner
let g:netrw_banner = 0
" open files in a new horizontal split
let g:netrw_browse_split = 1
" Set the width of the directory explorer
let g:netrw_winsize = 25
augroup ProjectDrawer
autocmd!
autocmd VimEnter * :Vexplore
augroup END
" This will set your path variable to current directory (from which you launched vim) and to all directories under current directory recursively.
set path=$PWD/**
" Highlight all search pattern matches
set hlsearch
set tabstop=4
set shiftwidth=4
set expandtab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.