Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " ██╗ ██╗██╗███╗ ███╗
- " ██║ ██║██║████╗ ████║
- " ██║ ██║██║██╔████╔██║
- " ╚██╗ ██╔╝██║██║╚██╔╝██║
- " ╚████╔╝ ██║██║ ╚═╝ ██║
- " ╚═══╝ ╚═╝╚═╝ ╚═╝
- "
- " Nequo's Vim config
- "
- set nocompatible " disable vi compatibility
- "Plugins {{{
- "Automatically pull in vim plug if it isn't installed
- if empty(glob('~/.vim/autoload/plug.vim'))
- silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
- \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
- autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
- endif
- call plug#begin('~/.vim/plugged')
- Plug 'morhetz/gruvbox'
- Plug 'joshdick/onedark.vim'
- Plug 'ervandew/supertab'
- Plug 'davidhalter/jedi-vim'
- Plug 'kien/ctrlp.vim'
- Plug 'scrooloose/nerdtree'
- Plug 'mhinz/vim-startify'
- Plug 'tpope/vim-surround'
- Plug 'tpope/vim-commentary'
- "Git
- Plug 'tpope/vim-fugitive'
- "Python
- Plug 'nvie/vim-flake8'
- Plug 'ryanoasis/vim-devicons' "Load this last
- call plug#end()
- "Plugin settings
- let g:jedi#use_splits_not_buffers = "right"
- "NerdTree
- map <F3> :NERDTreeToggle<CR>
- " }}}
- "Colors {{{
- "if exists('+termguicolors')
- set termguicolors
- "endif
- syntax enable
- "set t_Co=256
- let g:frost_comment_brightness=20
- let g:gruvbox_contrast_dark="medium"
- set bg=dark
- colo gruvbox
- "}}}
- "Syntax{{{
- augroup asm_syntax
- au!
- autocmd BufNewFile,BufRead *.asm set syntax=nasm
- augroup END
- "}}}
- "Spaces and Tabs{{{
- set tabstop=4 " number of visual spaces per TAB
- set softtabstop=4 " number of spaces in tab when editing
- set expandtab " tabs are spaces
- set autoindent "always turn on indentation
- set breakindent "Wrap lines at same indent level
- set shiftwidth=4 "Spaces to use for autoindenting
- set backspace=indent,eol,start " proper backspace behavior
- "}}}
- "UI Config{{{
- set number " show line numbers
- set showcmd " show command in bottom bar
- set cursorline " highlight current line
- filetype indent on " load filetype-specific indent files
- set wildmenu " visual autocomplete for command menu
- set lazyredraw " redraw only when we need to.
- set showmatch " highlight matching [{()}]
- set scrolloff=5 " always leave 5 spaces when scrolling
- set linebreak " don't wrap words
- "set noshowmode " Statusline already shows mode so remove it from under it
- set timeoutlen=1000 ttimeoutlen=10 "Eliminate delay when changing mode
- let $VTE_VERSION="100" "Trying to fix weird bug
- " Splits
- nnoremap <C-J> <C-W><C-J>
- nnoremap <C-K> <C-W><C-K>
- nnoremap <C-L> <C-W><C-L>
- nnoremap <C-H> <C-W><C-H>
- set splitbelow
- set splitright
- "}}}
- "Leader Shortcuts{{{
- let mapleader="," " leader is comma
- " jk is escape
- inoremap jk <esc>
- "Open vimrc
- nnoremap <leader>ev :vsp $MYVIMRC<CR>
- "}}}
- "Searching {{{
- set incsearch " search as characters are entered
- set hlsearch " highlight matches
- " turn off search highlight
- nnoremap <leader><space> :nohlsearch<CR>
- "}}}
- "Folding {{{
- set foldenable " enable folding
- set foldlevelstart=10 " open most folds by default
- set foldnestmax=10 " 10 nested fold max
- set foldmethod=indent " fold based on indent level
- nnoremap <space> za
- " }}}
- "Movement {{{
- " move vertically by visual line
- nnoremap j gj
- nnoremap k gk
- " highlight last inserted text
- nnoremap gV `[v`]
- "}}}
- "Omnicompletion{{{
- filetype plugin on
- set omnifunc=syntaxcomplete#Complete
- let g:SuperTabDefaultCompletionType = "<c-x><c-o>"
- "}}}
- "StatusLine{{{
- set laststatus=2
- hi PrimaryBlock guibg=#ff8000 guifg=#282828 ctermfg=00 ctermbg=06
- "hi SecondaryBlock guibg=#ECCF95 guifg=#282828 ctermfg=00 ctermbg=04
- "hi ThirdBlock guibg=#A3BE8C guifg=#282828 ctermfg=00 ctermbg=02
- hi Blanks ctermfg=07 ctermbg=0
- set statusline=
- set statusline+=%#PrimaryBlock# "Change color
- set statusline+=\ %t\ %(%m%) "File name(tail) and modified flag
- set statusline+=%#Blank# "Change color
- "set statusline+=\ %f "Full file path
- set statusline+=\ %Y\ %{WebDevIconsGetFileTypeSymbol()} "Show file type in capitals
- set statusline+=%= "Adds the middle padding
- set statusline+=%#PrimaryBlock# "Change color
- set statusline+=\ Ln\ %l:\ %c\ "Line and Column
- set statusline+=%#Blank# "Change color
- "}}}
- "Commands{{{
- "Search the notes directory for a pattern, using the shortcut defined
- command! -nargs=1 Ngrep vimgrep "<args>" $NOTES_DIR/CS-Y3/**/*.md
- nnoremap <leader>[ :Ngrep
- "F10 shows highlight group of word under cursor
- map <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
- \ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
- \ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
- "}}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement