Advertisement
Guest User

Nequo Vimrc

a guest
Dec 5th, 2018
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 5.24 KB | None | 0 0
  1. " ██╗   ██╗██╗███╗   ███╗
  2. " ██║   ██║██║████╗ ████║
  3. " ██║   ██║██║██╔████╔██║
  4. " ╚██╗ ██╔╝██║██║╚██╔╝██║
  5. "  ╚████╔╝ ██║██║ ╚═╝ ██║
  6. "   ╚═══╝  ╚═╝╚═╝     ╚═╝
  7. "
  8. " Nequo's Vim config
  9. "
  10. set nocompatible    " disable vi compatibility
  11. "Plugins {{{
  12. "Automatically pull in vim plug if it isn't installed
  13. if empty(glob('~/.vim/autoload/plug.vim'))
  14.   silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
  15.     \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  16.   autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
  17. endif
  18.  
  19. call plug#begin('~/.vim/plugged')
  20.     Plug 'morhetz/gruvbox'
  21.     Plug 'joshdick/onedark.vim'
  22.     Plug 'ervandew/supertab'
  23.     Plug 'davidhalter/jedi-vim'
  24.     Plug 'kien/ctrlp.vim'
  25.     Plug 'scrooloose/nerdtree'
  26.     Plug 'mhinz/vim-startify'
  27.     Plug 'tpope/vim-surround'
  28.     Plug 'tpope/vim-commentary'
  29.     "Git
  30.     Plug 'tpope/vim-fugitive'
  31.     "Python
  32.     Plug 'nvie/vim-flake8'
  33.     Plug 'ryanoasis/vim-devicons'   "Load this last
  34. call plug#end()
  35.  
  36. "Plugin settings
  37. let g:jedi#use_splits_not_buffers = "right"
  38. "NerdTree
  39. map <F3> :NERDTreeToggle<CR>
  40.  
  41. " }}}
  42. "Colors {{{
  43. "if exists('+termguicolors')
  44. set termguicolors
  45. "endif
  46. syntax enable
  47. "set t_Co=256
  48. let g:frost_comment_brightness=20
  49. let g:gruvbox_contrast_dark="medium"
  50. set bg=dark
  51. colo gruvbox
  52.  
  53. "}}}
  54. "Syntax{{{
  55. augroup asm_syntax
  56.     au!
  57.     autocmd BufNewFile,BufRead *.asm set syntax=nasm
  58. augroup END
  59. "}}}
  60. "Spaces and Tabs{{{
  61. set tabstop=4           " number of visual spaces per TAB
  62. set softtabstop=4   " number of spaces in tab when editing
  63. set expandtab       " tabs are spaces
  64. set autoindent          "always turn on indentation
  65. set breakindent         "Wrap lines at same indent level
  66. set shiftwidth=4        "Spaces to use for autoindenting
  67. set backspace=indent,eol,start " proper backspace behavior
  68. "}}}
  69. "UI Config{{{
  70. set number                          " show line numbers
  71. set showcmd                         " show command in bottom bar
  72. set cursorline                      " highlight current line
  73. filetype indent on                  " load filetype-specific indent files
  74. set wildmenu                        " visual autocomplete for command menu
  75. set lazyredraw                      " redraw only when we need to.
  76. set showmatch                       " highlight matching [{()}]
  77. set scrolloff=5                     " always leave 5 spaces when scrolling
  78. set linebreak                       " don't wrap words
  79. "set noshowmode                      " Statusline already shows mode so remove it from under it
  80. set timeoutlen=1000 ttimeoutlen=10  "Eliminate delay when changing mode
  81. let $VTE_VERSION="100"              "Trying to fix weird bug
  82. " Splits
  83.  
  84. nnoremap <C-J> <C-W><C-J>
  85. nnoremap <C-K> <C-W><C-K>
  86. nnoremap <C-L> <C-W><C-L>
  87. nnoremap <C-H> <C-W><C-H>
  88. set splitbelow
  89. set splitright
  90. "}}}
  91. "Leader Shortcuts{{{
  92. let mapleader=","       " leader is comma
  93. " jk is escape
  94. inoremap jk <esc>
  95. "Open vimrc
  96. nnoremap <leader>ev :vsp $MYVIMRC<CR>
  97. "}}}
  98. "Searching {{{
  99. set incsearch           " search as characters are entered
  100. set hlsearch            " highlight matches
  101. " turn off search highlight
  102. nnoremap <leader><space> :nohlsearch<CR>
  103. "}}}
  104. "Folding {{{
  105. set foldenable          " enable folding
  106. set foldlevelstart=10   " open most folds by default
  107. set foldnestmax=10      " 10 nested fold max
  108. set foldmethod=indent   " fold based on indent level
  109. nnoremap <space> za
  110. " }}}
  111. "Movement {{{
  112. " move vertically by visual line
  113. nnoremap j gj
  114. nnoremap k gk
  115. " highlight last inserted text
  116. nnoremap gV `[v`]
  117. "}}}
  118. "Omnicompletion{{{
  119. filetype plugin on
  120. set omnifunc=syntaxcomplete#Complete
  121. let g:SuperTabDefaultCompletionType = "<c-x><c-o>"
  122. "}}}
  123. "StatusLine{{{
  124. set laststatus=2
  125. hi PrimaryBlock   guibg=#ff8000 guifg=#282828 ctermfg=00 ctermbg=06
  126. "hi SecondaryBlock guibg=#ECCF95 guifg=#282828 ctermfg=00 ctermbg=04
  127. "hi ThirdBlock     guibg=#A3BE8C guifg=#282828 ctermfg=00 ctermbg=02
  128. hi Blanks                                     ctermfg=07 ctermbg=0
  129.  
  130. set statusline=
  131. set statusline+=%#PrimaryBlock#             "Change color
  132. set statusline+=\ %t\ %(%m%)                  "File name(tail) and modified flag
  133. set statusline+=%#Blank#                    "Change color
  134. "set statusline+=\ %f                        "Full file path
  135. set statusline+=\ %Y\ %{WebDevIconsGetFileTypeSymbol()}                       "Show file type in capitals
  136. set statusline+=%=                          "Adds the middle padding
  137. set statusline+=%#PrimaryBlock#           "Change color
  138. set statusline+=\ Ln\ %l:\ %c\              "Line and Column
  139. set statusline+=%#Blank#               "Change color
  140.  
  141. "}}}
  142. "Commands{{{
  143. "Search the notes directory for a pattern, using the shortcut defined
  144. command! -nargs=1 Ngrep vimgrep "<args>" $NOTES_DIR/CS-Y3/**/*.md
  145. nnoremap <leader>[ :Ngrep
  146.  
  147. "F10 shows highlight group of word under cursor
  148.  
  149. map <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
  150. \ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
  151. \ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
  152. "}}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement