-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
89 lines (69 loc) · 2.04 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
" Automatic reloading of .vimrc
autocmd! bufwritepost .vimrc source %
" plugin management
call pathogen#infect()
" Better copy & paste
" When you want to paste large blocks of code into vim, press F2 before you
" paste. At the bottom you should see ``-- INSERT (paste) --``.
set pastetoggle=<F2>
set clipboard=unname
set mouse=a
set bs=2
let mapleader = ","
" Quick save command
noremap <Leader>s :update<CR>
" Quick exit command
noremap <Leader>q :quit<CR>
""bind Ctrl+<movement> keys to move around the windows, instead of using Ctrl+w + <movement>
" Every unnecessary keystroke that can be saved is good for your health :)
map <c-h> <c-w>h
map <c-j> <c-w>j
map <c-k> <c-w>k
map <c-l> <c-w>l
" The Smash Escape
inoremap jk <Esc>
inoremap kj <Esc>
" Command-line editing style
cnoremap <C-j> <t_kd>
cnoremap <C-k> <t_ku>
noremap <C-a> <Home>
"noremap <C-e> <End>
" easier moving between tabs
map <Leader>n <esc>:tabprevious<CR>
map <Leader>m <esc>:tabnext<CR>
map <C-t> <Esc>:tabnew<CR>
map <Leader>f <Esc>:tabf
" map sort function to a key
vnoremap <Leader>s :sort<CR>
" easier moving of code blocks
" Try to go into visual mode (v), thenselect several lines of code here and
" then press ``>`` several times.
vnoremap < <gv " better indentation
vnoremap > >gv " better indentation
" Color scheme
" mkdir -p ~/.vim/colors && cd ~/.vim/colors
" wget -O wombat256mod.vim http://www.vim.org/scripts/download_script.php?src_id=13400
" set t_Co=256
" color wombat256mod
" Solarized colors
" syntax enable
set background=dark
colorscheme solarized
" Enable syntax highlighting
" You need to reload this file for the change to apply
filetype off
filetype plugin indent on
syntax on
" Showing line numbers and length
set number " show line numbers
set tw=79 " width of document (used by gd)
set nowrap " don't automatically wrap on load
set fo-=t " don't automatically wrap text when typing
set colorcolumn=80
highlight ColorColumn ctermbg=000
" Real programmers don't use TABs but spaces
set tabstop=4
set softtabstop=4
set shiftwidth=4
set shiftround
set expandtab