Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " Notes {
- " This is comrad Eugene's .vimrc
- " }
- " General {
- set nocompatible " get out of vi-compatible mode
- set t_Co=256 " get all the colorful happyness
- set autochdir " always switch to current file directory
- set backspace=indent,eol,start " make backspace flexible
- set backup " make backup files
- set backupdir=~/.vim/backup " make backup files
- set directory=~/.vim/tmp " directory to place swap files in
- set fileformats=unix,dos,mac " support 'em in this order
- set fileencodings=utf-8,cp1251,koi8-r,cp866 " support 'em in this order
- set history=1000 " store lots of :cmdline history
- set mouse=a " use mouse everywhere
- set ttymouse=xterm2 " some stuff to get the mouse going in term
- " }
- " UI {
- syntax on " syntax highlighting on
- set background=light
- colorscheme molokai
- set backspace=indent,eol,start " allow backspacing over everything in insert mode
- " set cursorcolumn " highlight the current column
- set cursorline " highlight the current line
- set cpoptions=aABceFsmq
- " |||||||||
- " ||||||||+-- When joining lines, leave the cursor
- " ||||||| between joined lines
- " |||||||+-- When a new match is created (showmatch)
- " |||||| pause for .5
- " ||||||+-- Set buffer options when entering the
- " ||||| buffer
- " |||||+-- :write command updates current file name
- " ||||+-- Automatically add <CR> to the last line
- " ||| when using :@r
- " |||+-- Searching continues at the end of the match
- " || at the cursor position
- " ||+-- A backslash has no special meaning in mappings
- " |+-- :write updates alternative file name
- " +-- :read updates alternative file name
- set hidden "hide buffers when not displayed
- set incsearch " highlight matches as you type
- set lazyredraw " do not redraw while running macros
- set matchtime=0 " blink matching brackets for 0s
- set nohlsearch " do not highlight searched for phrases
- set nostartofline " leave my cursor where it was
- set novisualbell " don't blink
- set number " turn on line numbers
- set numberwidth=5 " good up to 99999 lines
- set report=0 " tell us when anything is changed via :...
- set ruler " always show current positions along the bottom
- set scrolloff=10 " Keep 10 lines (top/bottom) for scope
- set shortmess=aOstT " shortens message to avoid 'press key' prompt
- set showcmd " show the command being typed
- set showmatch " show matching brackets
- set sidescrolloff=10 " Keep 5 lines at the size
- set wildmenu " turn on command line completion wild style
- set wildignore=*.dll,*.o,*,obj,*.bak,*.exe,*.pyc,*.jpg,*.jpg,*.png
- set wildmode=list:longest " make cmdline tab completion similar to bash
- " }
- " StatusLine {
- set laststatus=2 " always show the status line
- set statusline=%F%m%r%h%w\ [%{&ff}]\ %y%=L:%l/%L\ C:%c%V\ [%p%%]"\ %{strftime(\"%d/%m/%y\ -\ %H:%M\")}
- " | | | | | | | | | | | |
- " | | | | | | | | | | | |
- " | | | | | | | | | | | +-- current %
- " | | | | | | | | | | +-- current
- " | | | | | | | | | | column
- " | | | | | | | | | +- lines number
- " | | | | | | | | +-- current line
- " | | | | | | | +-- spacer
- " | | | | | | +-- current syntax in
- " | | | | | | square brackets
- " | | | | | +-- current fileformat
- " | | | | +-- preview flag in square brackets
- " | | | +-- help flag in square brackets
- " | | +-- readonly flag in square brackets
- " | +-- rodified flag in square brackets
- " +-- full path to file in the buffer
- "hi StatusLine ctermfg=black ctermbg=green gui=none
- "au InsertEnter * hi StatusLine term=reverse ctermbg=magenta
- "au InsertLeave * hi StatusLine term=reverse ctermbg=green
- " }
- " Text Formatting/Layout {
- set autoindent
- set completeopt= " dont use a pop up menu for completions
- set expandtab " no real tabs please!
- set hlsearch " hilight searches by default
- set ignorecase " case insensitive by default
- set incsearch " find the next match as we type the search
- set linebreak " wrap lines at convenient points
- set nowrap " do not wrap lines
- set shiftround " when at 3 spaces, and I hit > ... go to 4, not 5
- set smartcase " if there are caps, go case-sensitive
- set shiftwidth=4 " auto-indent amount when using cindent
- set softtabstop=4 " when hitting tab or backspace
- set tabstop=8 " real tabs should be 8, and they will show with set list on
- set list " display tabs and trailing spaces
- set listchars=tab:▷⋅,trail:⋅,nbsp:⋅
- " }
- " Folding {
- " i'm using to hate this
- "iset foldmethod=indent "fold based on indent
- "set foldnestmax=3 "deepest fold is 3 levels
- "set nofoldenable "dont fold by default
- " }
- " Mappings {
- "noremap <S-space> <C-b>
- "noremap <space> <C-f>
- "map ^P :Lodgeit<CR>
- map <C-Q> :q!<CR>
- "nnoremap <C-B> :BufExplorer<cr>
- " visual search mappings {
- function! s:VSetSearch()
- let temp = @@
- norm! gvy
- let @/ = '\V' . substitute(escape(@@, '\'), '\n', '\\n', 'g')
- let @@ = temp
- endfunction
- vnoremap * :<C-u>call <SID>VSetSearch()<CR>//<CR>
- vnoremap # :<C-u>call <SID>VSetSearch()<CR>??<CR>
- " }
- " }
- " Plugin Settings {
- " NERDTree {
- "function OpenNERDTree()
- " execute ":NERDTree"
- "endfunction
- "command -nargs=0 OpenNERDTree :call OpenNERDTree()
- "autocmd VimEnter * NERDTree
- "autocmd VimEnter * wincmd p
- " }
- " IntelliSense {
- "let g:syntastic_enable_signs=1
- " }
- " }
- " Autocommands {
- " load ftplugins and indent files
- "filetype plugin on
- "filetype indent on
- " Настройка omnicomletion для Python (а так же для js, html и css)
- "autocmd FileType python set omnifunc=pythoncomplete#Complete
- "autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
- "autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
- "autocmd FileType css set omnifunc=csscomplete#CompleteCSS
- " Python {
- " знерщт standard 4 spaces, always
- au BufRead,BufNewFile *.py set shiftwidth=4
- au BufRead,BufNewFile *.py set softtabstop=4
- " }
- " Ruby {
- " ruby standard 2 spaces, always
- au BufRead,BufNewFile *.rb,*.rhtml,*.haml,*.sass set shiftwidth=2
- au BufRead,BufNewFile *.rb,*.rhtml,*.haml,*.sass set softtabstop=2
- compiler ruby
- " }
- " Makefile {
- au BufRead,BufNewFile *Makefile set noet " real tabs in Makefile's
- " }
- "recalculate the trailing whitespace warning when idle, and after saving
- autocmd cursorhold,bufwritepost * unlet! b:statusline_trailing_space_warning
- " }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement