Created
July 4, 2019 13:30
-
-
Save marian-pritsak/c9a5249734c07f4b255e05b992c7e796 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
set shiftwidth=4 | |
set smartindent | |
set cindent | |
set hlsearch | |
set incsearch | |
set expandtab | |
set laststatus=2 | |
set statusline=%f | |
syntax enable | |
colorscheme monokai | |
set ignorecase | |
set smartcase | |
set cursorline | |
fun! ShowFuncName() | |
let lnum = line(".") | |
let col = col(".") | |
echohl ModeMsg | |
echo getline(search("^[^ \t#/]\\{2}.*[^:]\s*$", 'bW')) | |
echohl None | |
call search("\\%" . lnum . "l" . "\\%" . col . "c") | |
endfun | |
" map f :call ShowFuncName() <CR> | |
" switch between buffers | |
nnoremap <silent> [b :bprevious!<CR> | |
nnoremap <silent> ]b :bnext!<CR> | |
nnoremap <silent> [B :bfirst!<CR> | |
nnoremap <silent> ]B :blast!<CR> | |
nmap ]] g<C-]> | |
" Mappings for vim diff | |
if &diff " only for diff mode/vimdiff | |
set diffopt=filler,context:1000000 " filler is default and inserts empty lines for sync | |
nmap <F5> :diffupdate<CR> | |
nmap <F11> do<CR> | |
nmap <PageDown> ]c | |
nmap <PageUp> [c | |
cmap q qa | |
endif | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'MarcWeber/vim-addon-mw-utils' | |
Plugin 'tomtom/tlib_vim' | |
Plugin 'easymotion/vim-easymotion' | |
Plugin 'tpope/vim-commentary' | |
Plugin 'crusoexia/vim-monokai' | |
Plugin 'ervandew/supertab' | |
Plugin 'nathanaelkane/vim-indent-guides' | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" To ignore plugin indent changes, instead use: | |
"filetype plugin on | |
" | |
" Brief help | |
" :PluginList - lists configured plugins | |
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate | |
" :PluginSearch foo - searches for foo; append `!` to refresh local cache | |
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal | |
" | |
" see :h vundle for more details or wiki for FAQ | |
" Put your non-Plugin stuff after this line | |
" | |
" python from powerline.vim import setup as powerline_setup | |
" python powerline_setup() | |
" python del powerline_setup | |
set laststatus=2 | |
let sessionfile = "~/session@" . $TTY . ".vim" | |
function SaveSession() | |
execute 'mks!' fnameescape(g:sessionfile) | |
endfunction | |
" Autosave session | |
autocmd VimLeavePre * call SaveSession() | |
" Restore session | |
execute 'nnoremap <F3> :so' fnameescape(g:sessionfile)'<CR>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment