-
Notifications
You must be signed in to change notification settings - Fork 1
/
.vimrc
73 lines (62 loc) · 2.54 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
" General
set number " Show line numbers
set relativenumber " Show relative line numbers
set lazyredraw
set regexpengine=1 " use old engine (makes relativenumber faster)
set linebreak " Break lines at word (requires Wrap lines)
set showbreak=+++ " Wrap-broken line prefix
set textwidth=100 " Line wrap (number of cols)
set showmatch " Highlight matching brace
" set spell " Enable spell-checking
" set errorbells " Beep or flash screen on errors
" set visualbell " Use visual bell (no beeping)
set hlsearch " Highlight all search results
set smartcase " Enable smart-case search
set gdefault " Always substitute all matches in a line
set ignorecase " Always case-insensitive
set incsearch " Searches for strings incrementally
set autoindent " Auto-indent new lines
set cindent " Use 'C' style program indenting
set expandtab " Use spaces instead of tabs
set shiftwidth=4 " Number of auto-indent spaces
set smartindent " Enable smart-indent
set smarttab " Enable smart-tabs
set softtabstop=4 " Number of spaces per Tab
" Advanced
set confirm " Prompt confirmation dialogs
set ruler " Show row and column ruler information
set showtabline=2 " Show tab bar
set undolevels=1000 " Number of undo levels
set backspace=indent,eol,start " Backspace behaviour
" Generated by VimConfig.com
" faster redrawing
set ttyfast
" specify different areas of the screen where the splits should occur by default
set splitbelow
set splitright
" split navigations
nnoremap <C-J> <C-W><C-J> " Ctrl-j move to the split below
nnoremap <C-K> <C-W><C-K> " Ctrl-k move to the split above
nnoremap <C-L> <C-W><C-L> " Ctrl-l move to the split to the right
nnoremap <C-H> <C-W><C-H> " Ctrl-m move to the split to the left
" Tab shortcuts
nnoremap <C-t> :tabnew<CR>
nnoremap <C-w> :tabclose<CR>
nnoremap tk :tabnext<CR>
nnoremap tj :tabprev<CR>
nnoremap th :tabfirst<CR>
nnoremap tl :tablast<CR>
syntax on
set t_Co=256
set mouse=a " Enable mouse support
colorscheme wombat256mod
" Tweaks for browsing
let g:netrw_banner=0 " disable annoying banner
let g:netrw_browse_split=4 " open in prior window
let g:netrw_altv=1 " open splits to the right
let g:netrw_liststyle=3 " tree view
" Move visually selected line up and down in various modes
nnoremap K :m .-2<CR>==
nnoremap J :m .+1<CR>==
vnoremap K :m '<-2<CR>gv=gv
vnoremap J :m '>+1<CR>gv=gv