-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
70 lines (52 loc) · 1.3 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
" autocmd! bufwritepost .vimrc source %
" automatic vim-plug installation
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
" vim-plug specs
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-sensible'
Plug 'junegunn/seoul256.vim'
call plug#end()
" copy_paste
set pastetoggle=<F2>
set clipboard=unnamed
" quicksave
noremap <Leader>w :update<CR>
vnoremap <Leader>w <C-C>:update<CR>
inoremap <Leader>w <C-O>:update<CR>
" map_leader
let mapleader = ","
" Ctrl+<movement> instead of Ctrl+w+<movement
map <c-j> <c-w>j
map <c-k> <c-w>k
map <c-l> <c-w>l
map <c-h> <c-w>h
" tab movement
map <Leader>n <esc>:tabprevious<CR>
map <Leader>m <esc>:tabnext<CR>
" explore, quit
map <Leader>e <esc>:Vexplore<CR>
map <Leader>q <esc>:q<CR>
" sort text
vnoremap <Leader>s :sort<CR>
" move indentations
vnoremap < <gv
vnoremap > >gv
autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red
au InsertLeave * match ExtraWhitespace /\s\+$/
" color scheme
set t_Co=256
color seoul256
filetype off
filetype plugin indent on
syntax on
" settings
set number
set tw=79
set nowrap
set fo-=t
set colorcolumn=80
highlight ColorColumn ctermbg=233