-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
83 lines (75 loc) · 2.4 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
syntax on
colorscheme slate
filetype on
filetype plugin on
set path+=** " find files into subfolders
set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx
set wildmenu " display all matching files when we tab complete
set wildmode=list:longest " Make wildmenu behave like similar to Bash completion.
set nocompatible " Disable compatibility with vi which can cause unexpected issues.
set backspace=indent,eol,start
set mouse=a
set cursorline " Highlight cursor line underneath the cursor horizontally.
set nocuc " do not show cursorcloumn
set nobackup " Do not save backup files.
set ignorecase
set incsearch
set hlsearch
set number relativenumber
set showmatch
set smartcase
set nowrap
set tabstop=8
set softtabstop=5
set shiftwidth=4
set autoindent
set smarttab
set clipboard=unnamedplus " Use system clipboard
set diffopt=filler,vertical " Vertical diff
set scrolloff=10 " Do not let cursor scroll below or above N number of lines when scrolling.
set history=1000 " Set the commands to save in history default number is 20
set showcmd " show cmd as you type
let g:currentmode={
\ 'n' : 'NORMAL',
\ 'v' : 'VISUAL',
\ 'V' : 'V·Line',
\ "\<C-V>" : 'V·Block',
\ 'i' : 'INSERT',
\ 'R' : 'R',
\ 'Rv' : 'V·Replace',
\ 'c' : 'Command',
\}
set statusline=
set statusline+=[%{toupper(g:currentmode[mode()])}]
set statusline+=\ %F\ %m\ %R
set statusline+=%=
set statusline+=\ %Y\ \|\ %l/%L\ \|\ %p%%
set laststatus=2
set showmode
" ---------------------------------------------------------------------------------------------------------------------
" MAPPINGS
" ---------------------------------------------------------------------------------------------------------------------
let mapleader=' '
nnoremap <leader>\ ``
inoremap jj <esc>
nnoremap <leader>nr :set norelativenumber<CR>
nnoremap <leader>rn :set relativenumber<CR>
nnoremap <leader>q :q<CR>
nnoremap <leader>s :w<CR>
nnoremap <leader>f :find
nnoremap <leader>d yyp
nnoremap <leader>p :e<space>
nnoremap <leader>x dd
nnoremap o o<esc>
nnoremap O O<esc>
nnoremap Y y$
nnoremap ; :
" file explorer
nnoremap <leader>1 :e .<CR>
" moving lines up and down
nnoremap <C-Down> :m .+1<CR>==
nnoremap <C-Up> :m .-2<CR>==
vnoremap <C-Down> :m '>+1<CR>==gv=gv
vnoremap <C-Up> :m '<-2<CR>==gv=gv
inoremap <C-Down> <Esc>:m .+1<CR>==gi
inoremap <C-Up> <Esc>:m .-2<CR>==gi