-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
55 lines (48 loc) · 1.7 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
call plug#begin('~/.vim/plugged')
" installing vim airline
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'edkolev/tmuxline.vim'
Plug 'airblade/vim-gitgutter'
Plug 'tpope/vim-fugitive'
Plug 'wsdjeg/vim-fetch'
" NERD tree will be loaded on the first invocation of NERDTreeToggle command
Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' }
Plug '~/.fzf'
call plug#end()
" ---------------
" UI
" ---------------
"set ruler " Ruler on
set number " Line numbers on
set nowrap " Line wrapping off
set laststatus=2 " Always show the statusline
set cmdheight=2 " Make the command area two lines high
set cursorline " Highlight current line
set encoding=utf-8
set noshowmode " Don't show the mode since Powerline shows it
set title " Set the title of the window in the terminal to the file
set showcmd " Show me what I'm typing
set autoindent " Enabile Autoindent
set autoread " Automatically read changed files
set expandtab " Convert tab to spaces
set ts=2 sw=2 ai " set tabstop =2 and shift width = 2 with auto indent
set nocompatible
fun! <SID>StripTrailingWhitespaces()
let l = line(".")
let c = col(".")
%s/\s\+$//e
call cursor(l, c)
endfun
autocmd BufWritePre * :call <SID>StripTrailingWhitespaces()
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#branch#enabled=1
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
let g:airline_symbols.space = "\ua0"
"Alias Wq to wq
command -complete=file -bang -nargs=? W :w<bang> <args>
command -complete=file -bang -nargs=? Wq :wq<bang> <args>
command -complete=file -bang -nargs=? Q :q<bang> <args>