Last active
December 30, 2015 11:39
-
-
Save velppa/7823911 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nmap <buffer> <silent> ]] :call search('\\c^\\<select\\>', 'W' )<CR> | |
nmap <buffer> <silent> [[ :call search('\\c^\\<select\\>', 'bW' )<CR> | |
" abbreviations | |
iab <buffer> maxdate DATE'5999-12-31' | |
iab <buffer> select SELECT | |
iab <buffer> from FROM | |
iab <buffer> and AND | |
iab <buffer> or OR | |
iab <buffer> on ON | |
iab <buffer> where WHERE | |
iab <buffer> join JOIN | |
iab <buffer> left LEFT | |
iab <buffer> nvl NVL | |
iab <buffer> group GROUP | |
iab <buffer> order ORDER | |
iab <buffer> by BY | |
-- .vimrc | |
" no compatibility is needed | |
set nocompatible | |
" detecting OS | |
function! GetRunningOS() | |
if has("win32") | |
return "win" | |
endif | |
if has("unix") | |
if system('uname')=~'Darwin' | |
return "mac" | |
else | |
return "unix" | |
endif | |
endif | |
endfunction | |
let os=GetRunningOS() | |
" Pathogen options | |
let g:pathogen_disabled = [] | |
if $ORACLE_HOME=='' | |
call add(g:pathogen_disabled, 'vorax4-beta') | |
endif | |
" disabling vim-powerline inside console vim | |
if has("gui_running")==0 && GetRunningOS()=='win' | |
call add(g:pathogen_disabled, 'vim-powerline') | |
endif | |
execute pathogen#infect() | |
" enabling syntax | |
syntax on | |
filetype on | |
" setting mapleader | |
let mapleader="," | |
" key mappings | |
map <F2> :NERDTreeToggle<CR> " shortcut to NERDTree | |
map <F3> :VORAXExplorerToggle<CR> " shortcut to VORAXExplorer | |
map <F8> :CrunchLine<CR> " shortcut to CrunchLine | |
map <F4> :nohlsearch<CR> " shortcut to CrunchLine | |
" map <F11> <Esc>:call libcallnr("gvimfullscreen.dll", "ToggleFullScreen", 0)<CR> | |
map <Tab> <Esc><C-W>p " going between windows | |
" including filetype plugin | |
filetype plugin indent on | |
" setting encoding | |
set encoding=utf-8 | |
" set encoding=cp1251 | |
" setting fileencoding | |
set fileencoding=cp1251 | |
" setting fileencodings | |
set fileencodings=cp1251,utf-8,cp866,koi8-r | |
" setting tabs | |
set expandtab | |
set shiftwidth=2 | |
set softtabstop=2 | |
" set autoindent | |
set autoindent | |
set smartindent | |
" settings from yadr | |
"set number "Line numbers are good | |
set foldcolumn=3 | |
set backspace=indent,eol,start "Allow backspace in insert mode | |
set history=1000 "Store lots of :cmdline history | |
set showcmd "Show incomplete cmds down the bottom | |
set showmode "Show current mode down the bottom | |
set gcr=a:blinkon0 "Disable cursor blink | |
"set visualbell "No sounds | |
"set autoread "Reload files changed outside vim | |
"set list listchars=tab:\ \ ,trail:В· "Display tabs and trailing spaces visually | |
set nowrap "Don't wrap lines | |
"set linebreak "Wrap lines at convenient points | |
" turning off swapfiles | |
set noswapfile | |
set nobackup | |
set nowb | |
" text options | |
set colorcolumn=80 | |
set textwidth=80 | |
" persistent undo | |
silent !mkdir ~/.vim-backups > /dev/null 2>&1 | |
set undodir=~/.vim-backups | |
set undofile | |
" Searching | |
set hlsearch | |
set ignorecase | |
" Starting vim from shell | |
if os!='win' | |
set shell=/bin/sh | |
endif | |
" Russian language support | |
if os=='win' | |
set keymap=russian-jcukenwin | |
elseif os=='mac' | |
set keymap=russian-jcukenmac | |
endif | |
set iminsert=0 | |
set imsearch=0 | |
highlight lCursor guifg=NONE guibg=Cyan | |
set iskeyword=@,48-57,_,192-255 | |
" Completion | |
set wildmode=list:longest | |
set wildmenu "enable ctrl-n and ctrl-p to scroll thru matches | |
set wildignore=*.o,*.obj,*~ "stuff to ignore when tab completing | |
set wildignore+=*vim/backups* | |
set wildignore+=*sass-cache* | |
set wildignore+=*DS_Store* | |
set wildignore+=vendor/rails/** | |
set wildignore+=vendor/cache/** | |
set wildignore+=*.gem | |
set wildignore+=log/** | |
set wildignore+=tmp/** | |
set wildignore+=*.png,*.jpg,*.gif | |
" Folds | |
set foldmethod=manual "fold based on indent | |
set foldnestmax=3 "deepest fold is 3 levels | |
set nofoldenable "dont fold by default | |
" Scrolling | |
"set scrolloff=8 "Start scrolling when we're 8 lines away from margins | |
"set sidescrolloff=15 | |
"set sidescroll=1 | |
" some remappings | |
"imap qq <ESC> | |
nmap <silent> <A-Up> :wincmd k<CR> | |
nmap <silent> <A-Down> :wincmd j<CR> | |
nmap <silent> <A-Left> :wincmd h<CR> | |
nmap <silent> <A-Right> :wincmd l<CR> | |
" Powerline config | |
set t_Co=256 | |
set laststatus=2 | |
let g:Powerline_symbols = 'fancy' | |
let g:Powerline_mode_V = 'V-LINE' | |
let g:Powerline_mode_cv = 'V-BLOCK' | |
let g:Powerline_mode_S = 'S-LINE' | |
let g:Powerline_mode_cs = 'S-BLOCK' | |
" Vorax config | |
set omnifunc=syntaxcomplete#Complete | |
if $VORAX == '1' | |
"set fileformats=unix,dos | |
let g:vorax_output_window_default_funnel = 2 | |
"let g:vorax_debug = 1 | |
endif | |
" SQLUtils config | |
let g:sqlutil_keyword_case = '\U' | |
let g:sqlutil_align_keyword_right = 1 | |
let g:sqlutil_align_comma = 1 | |
let g:sqlutil_align_where = 0 | |
" NERDTree config | |
let NERDTreeChDirMode=2 | |
" associate *.md with markdown | |
au BufRead,BufNewFile *.md set filetype=markdown | |
" Stopping visual paste insanity | |
"vnoremap p "_dp | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment