-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
123 lines (102 loc) · 4.37 KB
/
vimrc
File metadata and controls
123 lines (102 loc) · 4.37 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
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
" general settings
syntax enable " enable syntax highlight
filetype plugin on " enable filetype plugins
filetype detect
filetype indent on " enable language-specific indenting
set nocompatible " don't be compatible with vi
set nogdefault " don't use /g while searching
set wildmenu " show menu above the status line
set wildmode=full " complete the next full match
set wildchar=<Tab> " set TAB as a wildchar
set number " show line numbers by default
set showmode " show editor mode
set linebreak " do not break line inside of a word
set nowrap " don't wrap long lines
set showcmd " show command in the status bar
set ruler " show ruler at the bottom
set incsearch " show pattern while typing a search command
set ignorecase " required for smartcase below
set smartcase " ignore case only when lower case used
set hlsearch " highlight search pattern
set backspace=indent,eol,start " for backspace to work as expected in insert mode
set encoding=utf-8 " use unicode
set smartindent " autoindent when starting a new line
set tabstop=4 " number of spaces a <Tab> counts for
set shiftwidth=4 " number of spaces for each step of (auto)indent
set expandtab " use the appropriate number of spaces when inserting a <Tab>
set backup " backup original file that's being edited
set background=light " dark colours are more readable on light background
set statusline= " show default statusline
set matchpairs=(:),[:],{:},<:> " pairs for '%' command
set showmatch " show pairing symbol (starting one) when typing the ending one
set cursorline " show cursor line (cul)
set nocursorcolumn " don't show cursor column (cuc)
set path+=** " search down through subfolders
"set list " show end lines and tabulators
" pathogen
if filereadable(expand("~/.vim/autoload/pathogen.vim"))
runtime! autoload/pathogen.vim
if exists("g:loaded_pathogen")
execute pathogen#infect()
endif
endif
" auto completion
autocmd FileType css,html,perl,php,xml,xsd inoremap ' ''<Left>
autocmd FileType css,html,perl,php,xml,xsd inoremap '' ''<Left>
autocmd FileType css,html,perl,php,xml,xsd inoremap " ""<Left>
autocmd FileType css,html,perl,php,xml,xsd inoremap "" ""<Left>
autocmd FileType css,php,perl inoremap { {}<Left>
autocmd FileType css,php,perl inoremap {} {}<Left>
autocmd FileType html,xml inoremap <!-- <!-- --><Left><Left><Left>
autocmd FileType php,perl inoremap ( ()<Left>
autocmd FileType php,perl inoremap () ()<Left>
autocmd FileType php inoremap <?? <?php ?><Left><Left>
autocmd FileType php inoremap <?= <?=$?><Left><Left>
autocmd FileType php inoremap [ []<Left>
autocmd FileType php inoremap [] []<Left>
" settings for mail (within mutt)
"autocmd FileType mail setlocal formatoptions+=a
" GUI settings
if has("gui_running")
" general
set background=light
set columns=130 lines=40
set linespace=0
" OS X
if has("macunix")
set guifont=Roboto\ Mono\ for\ Powerline
let g:airline_theme='solarized'
colorscheme solarized
endif
" UNIX (GTK)
if has("gui_gtk")
set guifont=DejaVu\ Sans\ Mono\ for\ Powerline\ 8
set guioptions=aegit
colorscheme solarized
endif
else
let g:airline_theme='light'
endif
" colors
syn match Tab "\t"
hi def Tab ctermbg=red guibg=#ff0000
" restore the position of last edit
au BufReadPost * normal `"
" vim-airline
let g:airline#extensions#tabline#enabled = 1
"let g:airline_powerline_fonts = 1
" rainbow parentheses
"let g:rainbow_active = 1
" mapleader
let mapleader=","
let maplocalleader=","
" generate `tags`
command! MakeTags !ctags -R .
" mappings
nnoremap ,html5 :-read $HOME/.vim/snippets/html5.html<CR>5jwf>a
nnoremap ,boot3 :-read $HOME/.vim/snippets/bootstrap3.html<CR>5jwf>a
nnoremap ,boot4 :-read $HOME/.vim/snippets/bootstrap4.html<CR>7jwf>a
inoremap ,dd Dobrý den,<CR>
inoremap ,jo S pozdravem<CR>Jan Oppolzer<CR>
map <F5> :NERDTreeToggle<CR>
let g:snipMate = { 'snippet_version' : 1 }