-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.vimrc
95 lines (73 loc) · 2.13 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
90
91
92
93
94
95
" for Vundle
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" Install the searching plugin
Plugin 'rking/ag.vim'
" Install yaml highlighting
Plugin 'erikzaadi/vim-ansible-yaml'
Plugin 'avakhov/vim-yaml'
" Solarized
Plugin 'sickill/vim-monokai'
Plugin 'altercation/vim-colors-solarized'
" Syntax highlighting
Plugin 'kchmck/vim-coffee-script'
Plugin 'scrooloose/syntastic'
Plugin 'mtscout6/vim-cjsx'
" Control p
Plugin 'kien/ctrlp.vim'
Plugin 'ervandew/supertab'
call vundle#end()
" Appearance
syntax enable
" Searching
set incsearch
colorscheme monokai
set mouse=a "Click with the mouse
" Spacing
set tabstop=4 "4 spaces for tab
set softtabstop=4
set shiftwidth=4
set expandtab " tab with spaces
set lazyredraw " redraw only when we need to.
set showmatch "Highlight the closing parend
set number
set autoindent
" Text
set pastetoggle=<F2> "Hit f2 to enter paste mode
" Key remapping
let mapleader="\<Space>" "Use space bar as the leader key
" Move to the beginning or end of the line
nnoremap B ^
nnoremap E $
inoremap jk <Esc>
vnoremap jk <Esc>
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
nmap ; :
"Add in most recent command
nnoremap <silent> <leader>m :CtrlPMRU<CR>
" Decrease the timeout
set timeoutlen=200
"Replace common functions for writing
nnoremap <Leader>o :CtrlP<CR>
nnoremap <Leader>w :w<CR>
nnoremap <Leader>wq :wq<CR>
nnoremap <Leader>q :q<CR>
nnoremap <Leader>s :vs<CR>
nnoremap <Leader>v :e ~/.vimrc<CR>
" tmux will only forward escape sequences to the terminal if surrounded by a DCS sequence
" http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTinkbdoZ8eNR1X2UobLTeww1jFrvfJxTMfKSq-L%2B%40mail.gmail.com&forum_name=tmux-users
if exists('$TMUX')
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
else
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
endif