-
Notifications
You must be signed in to change notification settings - Fork 0
/
_vimrc
55 lines (38 loc) · 1.32 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
" config for sm@windows
" Syntax highlighting
syntax on
" Numbering lines and Relative numbering
set number
set relativenumber
" previous instance too(windows)
set backspace=indent,eol,start
" set a variable to quickly switch to work folder(windows)
" change it to your work folder
let $PRG="C:\\Users\\sudip\\Documents\\Programming\\"
" set the clipboard to unnamed for accessing system clipboard
set clipboard=unnamed
" set the statusline
set laststatus=2
" Map Ctrl-U to uppercase the current word in normal mode
" This is non recursive mapping
nnoremap <c-u> viwU
" Set the leader(prefix) key. Useful in custom key mappings.
let mapleader= "-"
" Indent entire file. Remapped gg=G to =
nnoremap <leader>= gg=G
" Open _vimrc in new tab
" Use the commands fast or it'll not work
" Check the bottom right of the screen while using
nnoremap <leader>ev :tabedit $MYVIMRC<cr>
" Open _gvimrc in new tab
nnoremap <leader>eg :tabedit $MYGVIMRC<cr>
" Open the work folder quick
nnoremap <leader>ow :cd $PRG<cr>
" Reload the _vimrc
nnoremap <leader>sv :source $MYVIMRC<cr>
" Reload the _gvimrc
nnoremap <leader>sg :source $MYGVIMRC<cr>
" Compile cpp program
nnoremap <leader>c :!g++ -Wall -Werror -Wextra -pedantic -std=c++17 %
" Remap jk to <esc> in insert mode
inoremap jk <esc>