-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
83 lines (75 loc) · 2.41 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
set nocompatible " Disable vi-compatibility
set t_Co=256
set background=dark
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
set showmode " always show what mode we're currently editing in
set nowrap " don't wrap lines
set tabstop=4 " a tab is four spaces
set smarttab
set tags=tags
set softtabstop=4 " when hitting <BS>, pretend like a tab is removed, even if spaces
set expandtab " expand tabs by default (overloadable per file type later)
set shiftwidth=4 " number of spaces to use for autoindenting
set shiftround " use multiple of shiftwidth when indenting with '<' and '>'
set backspace=indent,eol,start " allow backspacing over everything in insert mode
set autoindent " always set autoindenting on
set copyindent " copy the previous indentation on autoindenting
set relativenumber
set number " always show line numbers
set ignorecase " ignore case when searching
set smartcase " ignore case if search pattern is all lowercase,
set timeout timeoutlen=200 ttimeoutlen=100
set visualbell " don't beep
set noerrorbells " don't beep
set autowrite "Save on buffer switch
set mouse=a
set incsearch "incremental dynamic search..
set hlsearch "highlight search results
set smartindent
syntax on
filetype indent on
filetype plugin on
"using delete/backspace key to remove the hlsearch
nmap <silent> <BS> :nohlsearch<CR>
"Yeah changing the map leader key to comma. It's easier that way.
let mapleader = ","
let g:mapleader = ","
" Map J and K keys to move through tabs...
"
nmap K gt
nmap J gT
"
" " Fast saves
nmap <leader>w :w!<cr>
"
" Fast quit, Boy i'm really lazy
nmap <leader>q :q!<cr>
" " Down is really the next line
nnoremap j gj
nnoremap k gk
"
""Easy escaping to normal model
imap jj <esc>
" Mapping redo.. this could be a bad practise but then
nmap rr :redo<cr>
"
" "Auto change directory to match current file ,cd
" nnoremap ,cd :cd %:p:h<CR>:pwd<CR>
"
" "easier window navigation
" Open splits
nmap vs :vsplit<cr>
nmap sp :split<cr>
"
"Moving through buffers
nmap <C-h> :bprev<cr>
nmap <C-l> :bnext<cr>
"wrapping inserts
set wrap
set linebreak
set showbreak=>>\
"Scrolling effects
set scrolloff=10