-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc
More file actions
88 lines (69 loc) · 1.27 KB
/
.vimrc
File metadata and controls
88 lines (69 loc) · 1.27 KB
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
" SETTINGS
let mapleader = " "
set clipboard=unnamedplus
" tabbing
set tabstop=2
set shiftwidth=2
set expandtab
set smartindent
" line visibility
set number
set nowrap
set scrolloff=5
" cosmetic
set guifont=CaskaydiaCove\ NF
set termguicolors
set background=dark " used by some themes to set dark/light mode
" search settings
set ignorecase
set smartcase
nnoremap <esc> <cmd>nohlsearch<cr>
" split direction
set splitbelow
set splitright
" KEYBINDS
" home
nnoremap H ^
xnoremap H ^
onoremap H ^
" end
nnoremap L $
xnoremap L $
onoremap L $
" x to cut
nnoremap x d
xnoremap x d
nnoremap xx dd
nnoremap X D
" make d not yank
nnoremap d "_d
xnoremap d "_d
nnoremap D "_D
xnoremap D "_D
" make c not yank
nnoremap c "_c
xnoremap c "_c
nnoremap C "_C
xnoremap C "_C
" make s not yank
nnoremap s "_s
xnoremap s "_s
nnoremap S "_S
xnoremap S "_S
" make p (visual) not yank
xnoremap p "_dP
xnoremap P "_dP
" Y to yank and keep visual mode selection
xnoremap Y ygv
" window commands
nmap <leader>q <cmd>q<cr>
nnoremap <c-h> <cmd>wincmd h<cr>
nnoremap <c-j> <cmd>wincmd j<cr>
nnoremap <c-k> <cmd>wincmd k<cr>
nnoremap <c-l> <cmd>wincmd l<cr>
" buffer commands
nmap <leader>s <cmd>w<cr>
nmap <s-tab> <cmd>bprev<cr>
nmap <tab> <cmd>bnext<cr>
" exit term mode
tnoremap <c-\><c-\> <c-\><c-n>