-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
110 lines (91 loc) · 3.69 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
" syntax on
" set statusline=%t[%{strlen(&fenc)?&fenc:'none'},%{&ff}]%h%m%r%y%=%c,%l/%L\ %P
"set expandtab
syntax on
set wildmenu
set hidden " you can change buffers without saving
set history=50 " keep 50 lines of command line history
set nowrap
set ignorecase
set smartcase
set autoindent " always set autoindenting on
set smartindent
set laststatus=2
set expandtab
set smarttab
set softtabstop=4
set shiftwidth=4
set langmenu=en
set helplang=en
set backup
set backupdir=$HOME/backup/vim
" following allows delete with backspace of indention
set backspace=indent,eol,start
set incsearch " do incremental searching
" set gdefault " global substitution per default
set t_Co=256
" set background=dark
" colorscheme lucius
set hlsearch
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set cursorline
set relativenumber
set novisualbell
set scrolloff=10
set sidescrolloff=10
set showmatch
set colorcolumn=80,120
" Colors
hi User1 term=inverse,bold cterm=bold ctermbg=darkgreen ctermfg=white
hi User2 term=inverse,bold cterm=bold ctermbg=darkmagenta ctermfg=white
hi User3 term=inverse,bold cterm=bold ctermbg=cyan ctermfg=white
hi User4 term=inverse,bold cterm=bold ctermbg=grey ctermfg=white
hi User5 term=inverse,bold cterm=bold ctermbg=red ctermfg=white
hi User6 term=inverse,bold cterm=bold ctermbg=darkyellow ctermfg=white
hi User7 term=inverse,bold cterm=bold ctermbg=blue ctermfg=white
hi MatchParen cterm=underline ctermbg=blue ctermfg=white
set statusline=
set statusline +=%2*\ %{&ff}\ %* "file format
set statusline +=%6*\ %y\ %* "file type
set statusline +=%5*\ %<%F\ %* "full path
set statusline +=\ %m\ "modified flag
set statusline +=%5*%r%* "read only flag
set statusline +=%= "space
" set statusline +=%7*%=\ pos:%12o\ %* "current byte position
set statusline +=%7*\ lines:%5l%* "current line
set statusline +=%7*/%L\ %* "total lines
set statusline +=%2*\ cols:%4c\ %* "column number
set statusline +=%1*%7P\ %* "percentage through file
set statusline+=%#warningmsg#
" set statusline+=\ %{SyntasticStatuslineFlag()}\ " error counts
set statusline+=%*
set list
"set listchars=tab:▸\ ,trail:.,nbsp:%
set listchars=tab:▸\ ,eol:¬,trail:.,nbsp:%
:let mapleader = ","
filetype on
au BufNewFile,BufRead *.sql_diff set filetype=sql
call pathogen#infect()
" ======= setup ack as :grep ===========
set grepprg=ack\ --nogroup\ --column\ $*
set grepformat=%f:%l:%c:%m
" Bind nohl
" Removes highlight of your last search
" ``<C>`` stands for ``CTRL`` and therefore ``<C-n>`` stands for ``CTRL+n``
noremap <C-n> :nohl<CR>
vnoremap <C-n> :nohl<CR>
inoremap <C-n> :nohl<CR>
" Move between buffer list
nnoremap <Tab> :bnext<CR>
nnoremap <S-Tab> :bprevious<CR>
" setup for dbext =================
let g:dbext_default_profile_localtest = 'type=PGSQL:user=postgres:host=localhost:dbname=local_test_db:login_script='
"let g:dbext_default_login_script_dir = ''
" disable the output generated by .psqlrc file
let g:dbext_default_PGSQL_cmd_options = '-X'
augroup project1
au!
" Automatically choose the correct dbext profile
autocmd BufNewFile,BufRead */sqlanalyze/* DBSetOption profile=localtest
augroup end