forked from mardukbp/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
89 lines (70 loc) · 2.24 KB
/
vimrc
File metadata and controls
89 lines (70 loc) · 2.24 KB
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
" Runtime Path
set runtimepath=~/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.vim/after
" enable filetype plugin and indentation
filetype plugin indent on
"set autoindent
set tabstop=4
set softtabstop=4
set smarttab
set expandtab
set shiftwidth=4
set incsearch
set autoread
" Yank to the X Window System clipboard
set clipboard=unnamedplus
set ignorecase
syntax enable
set encoding=utf8
set wrap
colorscheme molokai
"colorscheme gruvbox
"colorscheme jellybeans
"colorscheme grb256
"colorscheme distinguished
"colorscheme vividchalk
"colorscheme breeze
set keymap=accents
set foldmethod=marker
set guifont=Consolas\ 14
" Show line numbers
" set number
" Tab completion
set wildmode=longest,list,full
set wildmenu
set wildignorecase
" Status line
function! SyntaxItem()
return synIDattr(synID(line("."),col("."),1),"name")
endfunction
set laststatus=2
set statusline+=%{SyntaxItem()}
if has('statusline')
set statusline=%#Question# " set highlighting
set statusline+=%-2.2n\ " buffer number
"set statusline+=%#WarningMsg# " set highlighting
set statusline+=%f\ " file name
set statusline+=%#Question# " set highlighting
set statusline+=%h%m%r%w\ " flags
set statusline+=%{strlen(&ft)?&ft:'none'}, " file type
set statusline+=%{(&fenc==\"\"?&enc:&fenc)}, " encoding
set statusline+=%{((exists(\"+bomb\")\ &&\ &bomb)?\"B,\":\"\")} " BOM
set statusline+=%{&fileformat}, " file format
set statusline+=%{&spelllang}, " language of spelling checker
set statusline+=%{SyntaxItem()} " syntax highlight group under cursor
set statusline+=%= " indent to the right
set statusline+=0x%-8B\ " character code under cursor
set statusline+=%-7.(%l,%c%V%)\ %<%P " cursor position/offset
endif
" Copy from above
imap <C-Up> kly$jp
" Switch between windows splitted vertically
map <leader>j :wincmd j<CR>
map <leader>k :wincmd k<CR>
" Don't wait for shift-o
" http://shallowsky.com/blog/linux/editors/vim-opening-lines.html
set ttimeoutlen=100
" Paste large amounts of text
set pastetoggle=<F2>
" Cursor movement like bash
imap <C-e> <End>
imap <C-a> <Home>