-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
45 lines (38 loc) · 950 Bytes
/
.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
" gui options
syntax on
filetype indent on
set number
set showcmd
set wildmenu
nmap ; :
" editor options
set clipboard=unnamed
set t_BE=
:let mapleader="," " set leader button to ,
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab
set exrc " read .vimrc from current directory
autocmd BufEnter * :syntax sync fromstart
" move vertically by visual line
nnoremap j gj
nnoremap k gk
" press ii to exit insert mode.
imap ii <Esc>
" easier split navigation
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
nnoremap <Leader>w <C-w>
" store swap files in fixed location, not current directory.
set directory=~/.vimswap//
set backupdir=~/.vimbackup//
" shortcut to move to current file directory
nnoremap <leader>cd :cd %:p:h<CR>:pwd<CR>
" search options
set ic " ignore case
set hls is " set highlighting
set incsearch " search as chars are entered
set hlsearch " highlight matches