-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
128 lines (102 loc) · 2.49 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
filetype off
runtime bundle/vim-pathogen/autoload/pathogen.vim
call pathogen#infect()
call pathogen#helptags()
filetype plugin indent on
set shell=/bin/bash
set nocompatible
set modelines=0
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
syntax enable
set t_Co=256
" let g:badwolf_termcolors=256
" colorscheme badwolf
colorscheme jellybeans
" colorscheme materialtheme
" colorscheme argonaut
set guifont=Source\ Code\ Pro\ for\ Powerline:h12
let g:Powerline_symbols='fancy'
let g:airline_powerline_fonts = 1
set encoding=utf-8
set scrolloff=3
set autoindent
set showmode
set showcmd
set hidden
set wildmenu
set wildmode=list:longest
set visualbell
set cursorline
set ttyfast
set ruler
set backspace=indent,eol,start
set laststatus=2
set relativenumber
" Define mapleaer
let mapleader = ","
" Search related
nnoremap / /\v
vnoremap / /\v
set incsearch
set hlsearch
set showmatch
set ignorecase
set smartcase
set gdefault
nnoremap <leader><space> :noh<CR>
set clipboard=unnamed
" undofile w/ special location
set undofile
set undodir=~/.vim/undo
" yankring
let g:yankring_history_dir = '~/.vim'
map <leader>y :YRShow<CR>
inoremap fd <ESC>
inoremap jk <ESC>
nmap <space> :
set wrap
set textwidth=79
set formatoptions=qrn1
set colorcolumn=80
set list
set listchars=tab:▸\ ,eol:¬
cmap w!! w !sudo tee % >/dev/null
set guioptions-=T
" Splitscreen mappings
nnoremap <leader>w <C-w>v<C-w>l
nnoremap <leader>h <C-w>s<C-w>j
map + <C-w>w
" Swap screens
map <C-x> <C-w>x
" Move between screen
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-h> <C-w>h
map <C-l> <C-w>l
" easymotion
" let g:EasyMotion_do_mapping = 0
map <Leader>e <Plug>(easymotion-prefix)
" nnoremap <silent> <Leader>f :call EasyMotion#F(0, 0)<CR>
" nnoremap <silent> <Leader>F :call EasyMotion#F(0, 1)<CR>
" Comment/Uncomment
map <leader>c \\\
autocmd FileType gringo set commentstring=%\ %s
autocmd FileType python set commentstring=#\ %s
autocmd FileType ansible_hosts set commentstring=#\ %s
" get .vimrc
nnoremap <leader>ev <C-w><C-v><C-l>:e $MYVIMRC<CR>
" Save like spacemacs
nnoremap :fs :w<CR>
" CtrlP settings
let g:ctrlp_map = '<leader>,'
nnoremap <leader>. :CtrlPTag<CR>
let g:ctrlp_working_path_mode = 0 " don't chdir FFS
let g:ctrlp_extensions = ['tag']
" Set the max files
let g:ctrlp_max_files = 10000
" Optimize file searching
let g:ctrlp_user_command = { 'types': { 1: ['.git/', 'cd %s && git ls-files'], 2: ['.hg/', 'cd %s && hg manifest'] }, 'fallback': 'find %s -type f | head -' . g:ctrlp_max_files }
let g:ansible_attribute_highlight = 'ab'