Created
February 21, 2019 18:02
-
-
Save Amperture/abecd3d032ea08bb8cc3ac4bcc4066f5 to your computer and use it in GitHub Desktop.
Current .vimrc as of Feb 21, 2019
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
set nocompatible " be iMproved, required | |
filetype off " required | |
" Plugins {{{ | |
" 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 'gmarik/Vundle.vim' | |
Plugin 'peterhoeg/vim-qml' | |
Plugin 'w0rp/ale' | |
Plugin 'bling/vim-airline' | |
Plugin 'prettier/vim-prettier' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'nvie/vim-flake8' | |
Plugin 'davidhalter/jedi-vim' | |
Plugin 'vim-airline/vim-airline-themes' | |
Plugin 'aliev/vim-compiler-python' | |
Plugin 'tmhedberg/SimpylFold' | |
Plugin 'vim-python/python-syntax' | |
Plugin 'Vimjas/vim-python-pep8-indent' | |
Plugin 'scrooloose/NERDTree' | |
Plugin 'jceb/vim-orgmode' | |
Plugin 'OmniCppComplete' | |
Plugin 'utl.vim' | |
Plugin 'DoxygenToolkit.vim' | |
Plugin 'vimscript/c-support' | |
Plugin 'vimwiki/vimwiki' | |
Plugin 'tbabej/taskwiki' | |
Plugin 'powerman/vim-plugin-AnsiEsc' | |
Plugin 'majutsushi/tagbar' | |
Plugin 'suan/vim-instant-markdown' | |
Plugin 'mattn/calendar-vim' | |
Plugin 'posva/vim-vue' | |
Plugin 'christoomey/vim-tmux-navigator' | |
Plugin 'Xuyuanp/nerdtree-git-plugin' | |
" All of your Plugins must be added before the following line | |
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 | |
" | |
" see :h vundle for more details or wiki for FAQ | |
" Put your non-Plugin stuff after this line | |
"execute pathogen#infect() | |
" }}} | |
"These lines are required for vim-latesquite | |
set grepprg=grep\ -nH\ $* | |
let g:tex_flavor = "latex" | |
let g:taskwiki_use_python2 = 1 "solves vimwiki problem using python 3 | |
autocmd vimenter * wincmd p | |
"autocmd BufNewFile,BufRead *.vue set syntax=html | |
autocmd FileType py syntax sync fromstart | |
autocmd FileType vue syntax sync fromstart | |
" --- Python Settings {{{ | |
let g:pymode_python = 'python3' | |
" }}} | |
" --- NERDTree Settings {{{ | |
autocmd vimenter * NERDTree | |
noremap <leader>o :NERDTreeToggle<CR> | |
vnoremap <leader>o <C-C>:NERDTreeToggle<CR> | |
inoremap <leader>o <C-O>:NERDTreeToggle<CR> | |
"Remove Help options Menu Hints | |
let NERDTreeMinimalUI = 1 | |
" Not even sure what this does. | |
" let NERDTreeDirArrows = 1 | |
" }}} | |
" --- Visual Settings {{{ | |
colorscheme relaxedgreen | |
filetype plugin indent on | |
"Display Red Barrier at Column 79 | |
set colorcolumn=79 | |
"Display cursor on last line of the screen or in the status line of a window | |
set ruler | |
"Set transparent background to work best with transparent terminal like URXVT | |
hi Normal ctermbg=None | |
set nu | |
syntax on | |
"}}} | |
" --- Saving {{{ | |
" Whether in normal, insert, or visual modes, ALT-S saves the current document. | |
nnoremap <M-s> :update<CR> | |
vnoremap <M-s> <C-c>:update<CR> | |
inoremap <M-s> <C-c>:update<CR> | |
"}}} | |
" --- Indentation {{{ | |
" Using Tab Key inserts four spaces instead. | |
set expandtab | |
set tabstop=2 | |
set shiftwidth=2 | |
set relativenumber | |
noremap <C-N> :call NumberToggle()<cr> | |
function! NumberToggle() | |
if(&relativenumber == 1) | |
set norelativenumber | |
else | |
set relativenumber | |
endif | |
endfunc | |
"}}} | |
" --- Tagbar {{{ | |
" Leader-i toggles the Tagbar | |
noremap <leader>i :TagbarToggle<CR> | |
vnoremap <leader>i <C-C>:TagbarToggle<CR> | |
inoremap <leader>i <C-O>:TagbarToggle<CR> | |
let g:tagbar_width = 30 | |
"}}} | |
" --- Navigation Binds {{{ | |
" Split Navigation -- A little more sane | |
nnoremap <C-h> <C-w>h | |
nnoremap <C-j> <C-w>j | |
nnoremap <C-k> <C-w>k | |
nnoremap <C-l> <C-w>l | |
" Rebind all arrow keys to be non-functional. USE HJKL DAMMIT | |
inoremap <Up> <NOP> | |
inoremap <Down> <NOP> | |
inoremap <Left> <NOP> | |
inoremap <Right> <NOP> | |
noremap <Up> <NOP> | |
noremap <Down> <NOP> | |
noremap <Left> <NOP> | |
noremap <Right> <NOP> | |
" }}} | |
" --- Folding {{{ | |
set foldmethod=marker | |
" Folding background color default is fucking awful. | |
hi Folded ctermbg=None | |
" Folding Navigation | |
nnoremap <silent> <leader>zj :call NextClosedFold('j')<cr> | |
nnoremap <silent> <leader>zk :call NextClosedFold('k')<cr> | |
function! NextClosedFold(dir) | |
let cmd = 'norm!z' . a:dir | |
let view = winsaveview() | |
let [l0, l, open] = [0, view.lnum, 1] | |
while l != l0 && open | |
exe cmd | |
let [l0, l] = [l, line('.')] | |
let open = foldclosed(l) < 0 | |
endwhile | |
if open | |
call winrestview(view) | |
endif | |
endfunction | |
"refocus folds; close any other fold except the one that you are on | |
nnoremap ,z zMzvzz | |
" }}} | |
" --- Misc Binds {{{ | |
"Rebind semicolon in normal mode into the functionality of colon. | |
"Also, double-semicolon should function as semicolon | |
map ; : | |
map ;; ; | |
let mapleader="," | |
nnoremap <silent> <F12> :bn<CR> | |
nnoremap <silent> <C-F12> :bp<CR> | |
nnoremap <C-Left> :tabprevious<CR> | |
nnoremap <C-Right> :tabnext<CR> | |
" }}} | |
" automatically open and close the popup menu / preview window | |
au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif | |
set completeopt=menuone,menu,longest,preview | |
function! SynStack() | |
if !exists("*synstack") | |
return | |
endif | |
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")') | |
endfunc | |
nnoremap <leader>syn :call SynStack()<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment