-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
52 lines (37 loc) · 1.07 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
syntax on
set background=dark
colorscheme wildcharm
nnoremap <SPACE> <Nop>
let mapleader=" "
set mouse=r
set encoding=utf-8
set pastetoggle=<F12>
set tabstop=4
set softtabstop=4
set shiftwidth=4
set autoindent
set expandtab
set cursorline
set hlsearch
set incsearch
set showcmd
set ruler
set number relativenumber
" nnoremap <silent> <leader>n :set number!<CR>
nmap <silent> <leader>n :set number! relativenumber!<CR>
set cursorline
highlight CursorLineNR ctermfg=red
set showbreak=↪\
set listchars=tab:»\ ,eol:↲,nbsp:⎵,trail:•,extends:⟩,precedes:⟨
nmap <silent> <leader>l :set invlist<CR>
nmap <silent> <leader>q :qa!<CR>
nmap <silent> <leader>w :w<CR>
nmap <silent> <leader>x :x<CR>
autocmd FileType yml setlocal ts=2 sts=2 sw=2 expandtab
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
autocmd Filetype gitconfig setlocal ts=8 sts=0 sw=8 noet
autocmd FileType gitcommit setlocal tw=72
" automatically move the cursor to the last position
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif