-
Notifications
You must be signed in to change notification settings - Fork 1
/
dot_vimrc
58 lines (50 loc) · 1.13 KB
/
dot_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
" General
set encoding=utf-8
set history=1000
set mouse=a
set shell=/usr/bin/zsh
set autoread
" Behaviour
set confirm
set linebreak
set wrap
set noerrorbells
set clipboard=unnamedplus
" UI
set number
set title
set wildmenu
"set cursorline
set background=light
set termguicolors
syntax enable
set background=dark
colorscheme solarized
" Search
set hlsearch
set ignorecase
set incsearch
set smartcase
" Editor
set smartindent
set expandtab
set tabstop=2
set shiftwidth=2
set shiftround
set smarttab
set paste
" Autocmd Magic
autocmd FocusLost,WinLeave * :silent! w " Save the file if we switch to another window
autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif " Jump back to previous position in file when you reopen a file
" Keybindings
let mapleader = ","
nnoremap <silent> <C-j> <C-W>j
nnoremap <silent> <C-k> <C-W>k
nnoremap <silent> <C-l> <C-W>l
nnoremap <silent> <C-h> <C-W>h
nnoremap <silent> <leader>jj <c-w>w<c-d><c-w>W " Scroll the window next to the current one
nnoremap <silent> <leader>kk <c-w>w<c-u><c-w>W
noremap ,<space> :nohlsearch<CR>
" For Plugins
packloadall
silent! helptags ALL