-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
94 lines (76 loc) · 2.47 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
filetype off "required
"so ~/.vim/plugins.vim
"so % "source this file
set rtp+=~/.vim/bundle/Vundle.vim
"call vundle#begin()
"Plugin 'VundleVim/Vundle.vim'
"Plugin 'tpope/vim-vinegar'
"Plugin 'preservim/nerdtree'
"Plugin 'ctrlpvim/ctrlp.vim'
"
"call vundle#end()
"filetype plugin indent on
"Default ============================================================
set enc=utf-8
set fenc=utf-8
set termencoding=utf-8
"Syntax =======================================================================
syntax enable
syntax on
set backspace=indent,eol,start "Enable BackSpace.
"“Hybrid” line numbers=======================
"set number
"set nonumber
set number! relativenumber!
set numberwidth=3 "Set foldcolumn=3
set noerrorbells visualbell t_vb= "No dawn bells! Settings visualbell.
set ls=2
let mapleader = "," "The default leader is \,
"but a comma is much better.
"let mapleader = "\<Space>" "Default leader
"Visuals ======================================================================
"colorscheme desert
"colorscheme atom-dark
colorscheme delek
"colo slate " Simple default colo
"colo pablo " Norm default colo
set guifont=Fira_Code:h15
set t_CO=256 "Use <t_CO> colors
"This is useful for Terminal Vim
set linespace=15 "Macvim-specific line-height
set encoding=utf-8
set guioptions-=e "We don't want Gui tabs.
set guioptions-=l
set guioptions-=L
set guioptions-=r
set guioptions-=R
"Auto-Commands ================================================================
"Automatically source the Vimrc file on save.
augroup autosourcing
autocmd!
autocmd BufWritePost .vimrc source %
augroup END
"Start NERDTree and leave the cursor in it.
"autocmd VimEnter * NERDTree | wincmd p
"Search =======================================================================
set hlsearch
set incsearch
"Mapping ======================================================================
"Make it easy edit files
nmap <Leader>ev :tabedit $MYVIMRC<cr>
"Leader key save and exit vim
nmap <Leader>q :q!<CR>
nmap <Leader>w :w<CR>
nmap <Leader>a :wq<CR>
"Split management
set splitbelow
set splitright
nmap <C-h> <C-w><C-h>
nmap <C-l> <C-w><C-l>
"Shortcut to open NERDTree
nnoremap <Leader>n :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-f> :NERDTreeFind<CR>
"CntrP
nmap <C-R> :CtrlPBufTag<cr>