Fixing my vimrc to match nvim config.

This commit is contained in:
Derek Taylor
2021-03-09 13:25:31 -06:00
parent a8a3ee798c
commit b5929750bc
2 changed files with 111 additions and 136 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
[geometry] [geometry]
posx=1920 posx=3840
posy=21 posy=21
sizex=1920 sizex=1920
sizey=1059 sizey=1059
+110 -135
View File
@@ -1,34 +1,50 @@
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " ____ _____
" => Vundle For Managing Plugins " | _ \_ _| Derek Taylor (DistroTube)
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " | | | || | http://www.youtube.com/c/DistroTube
" | |_| || | http://www.gitlab.com/dwt1/
" |____/ |_|
"
" A customized init.vim for neovim (https://neovim.io/)
set nocompatible " be iMproved, required set nocompatible " be iMproved, required
filetype off " required filetype off " required
" set the runtime path to include Vundle and initialize """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set rtp+=~/.vim/bundle/Vundle.vim " => Vundle For Managing Plugins
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
call vundle#begin() " required, all plugins must appear after this line. call plug#begin('~/.vim/plugged')
Plugin 'gmarik/Vundle.vim' " Vundle "{{ The Basics }}
Plugin 'itchyny/lightline.vim' " Lightline statusbar Plug 'gmarik/Vundle.vim' " Vundle
Plugin 'vifm/vifm.vim' Plug 'itchyny/lightline.vim' " Lightline statusbar
Plugin 'vimwiki/vimwiki' " Vim wiki Plug 'suan/vim-instant-markdown', {'rtp': 'after'} " Markdown Preview
Plugin 'scrooloose/nerdtree' " added nerdtree Plug 'frazrepo/vim-rainbow'
Plugin 'tiagofumo/vim-nerdtree-syntax-highlight' "{{ File management }}
Plugin 'ryanoasis/vim-devicons' Plug 'vifm/vifm.vim' " Vifm
Plugin 'frazrepo/vim-rainbow' Plug 'scrooloose/nerdtree' " Nerdtree
Plugin 'vim-python/python-syntax' Plug 'tiagofumo/vim-nerdtree-syntax-highlight' " Highlighting Nerdtree
Plugin 'jreybert/vimagit' Plug 'ryanoasis/vim-devicons' " Icons for Nerdtree
Plugin 'severin-lemaignan/vim-minimap' "{{ Productivity }}
Plugin 'ap/vim-css-color' " Color previews for CSS Plug 'vimwiki/vimwiki' " VimWiki
Plugin 'tpope/vim-surround' " Change surrounding marks Plug 'jreybert/vimagit' " Magit-like plugin for vim
"{{ Tim Pope Plugins }}
Plug 'tpope/vim-surround' " Change surrounding marks
"{{ Syntax Highlighting and Colors }}
Plug 'PotatoesMaster/i3-vim-syntax' " i3 config highlighting
Plug 'kovetskiy/sxhkd-vim' " sxhkd highlighting
Plug 'vim-python/python-syntax' " Python highlighting
Plug 'ap/vim-css-color' " Color previews for CSS
"{{ Junegunn Choi Plugins }}
Plug 'junegunn/goyo.vim' " Distraction-free viewing
Plug 'junegunn/limelight.vim' " Hyperfocus on a range
Plug 'junegunn/vim-emoji' " Vim needs emojis!
call vundle#end() " required, all plugins must appear before this line. call plug#end()
filetype plugin indent on " required filetype plugin indent on " required
" To ignore plugin indent changes, instead use: " To ignore plugin indent changes, instead use:
"filetype plugin on " filetype plugin on
" Brief help " Brief help
" :PluginList - lists configured plugins " :PluginList - lists configured plugins
@@ -39,15 +55,31 @@ filetype plugin indent on " required
" see :h vundle for more details or wiki for FAQ " see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line " Put your non-Plugin stuff after this line
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General Settings
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set path+=** " Searches current directory recursively.
set wildmenu " Display all matches when tab complete.
set incsearch " Incremental search
set hidden " Needed to keep multiple buffers open
set nobackup " No auto backups
set noswapfile " No swap
set t_Co=256 " Set if term supports 256 colors.
set number relativenumber " Display line numbers
set clipboard=unnamedplus " Copy/paste between vim and other programs.
syntax enable
let g:rehash256 = 1
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Remap Keys " => Remap Keys
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"Remap ESC to ii " Remap ESC to ii
:imap ii <Esc> :imap ii <Esc>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Powerline " => Status Line
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" The lightline.vim theme
let g:lightline = { let g:lightline = {
\ 'colorscheme': 'darcula', \ 'colorscheme': 'darcula',
\ } \ }
@@ -55,28 +87,16 @@ let g:lightline = {
" Always show statusline " Always show statusline
set laststatus=2 set laststatus=2
" Use 256 colours (Use this setting only if your terminal supports 256 colours)
set t_Co=256
syntax enable
set number relativenumber
let g:rehash256 = 1
" Uncomment to prevent non-normal modes showing in powerline and below powerline. " Uncomment to prevent non-normal modes showing in powerline and below powerline.
set noshowmode set noshowmode
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Text, tab and indent related " => Text, tab and indent related
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Use spaces instead of tabs set expandtab " Use spaces instead of tabs.
set expandtab set smarttab " Be smart using tabs ;)
set shiftwidth=4 " One tab == four spaces.
" Be smart when using tabs ;) set tabstop=4 " One tab == four spaces.
set smarttab
" 1 tab == 4 spaces
set shiftwidth=4
set tabstop=4
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => NERDTree " => NERDTree
@@ -92,25 +112,25 @@ let NERDTreeMinimalUI = 1
let g:NERDTreeWinSize=38 let g:NERDTreeWinSize=38
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Colors " => Colors and Theming
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
highlight LineNr ctermfg=8 ctermbg=none cterm=none highlight LineNr ctermfg=8 ctermbg=none cterm=none
highlight CursorLineNr ctermfg=7 ctermbg=8 cterm=none highlight CursorLineNr ctermfg=7 ctermbg=8 cterm=none
highlight VertSplit ctermfg=0 ctermbg=8 cterm=none highlight VertSplit ctermfg=0 ctermbg=8 cterm=none
highlight Statement ctermfg=2 ctermbg=none cterm=none highlight Statement ctermfg=2 ctermbg=none cterm=none
highlight Directory ctermfg=4 ctermbg=none cterm=none highlight Directory ctermfg=4 ctermbg=none cterm=none
highlight StatusLine ctermfg=7 ctermbg=8 cterm=none highlight StatusLine ctermfg=7 ctermbg=8 cterm=none
highlight StatusLineNC ctermfg=7 ctermbg=8 cterm=none highlight StatusLineNC ctermfg=7 ctermbg=8 cterm=none
highlight NERDTreeClosable ctermfg=2 highlight NERDTreeClosable ctermfg=2
highlight NERDTreeOpenable ctermfg=8 highlight NERDTreeOpenable ctermfg=8
highlight Comment ctermfg=4 ctermbg=none cterm=none highlight Comment ctermfg=4 ctermbg=none cterm=italic
highlight Constant ctermfg=12 ctermbg=none cterm=none highlight Constant ctermfg=12 ctermbg=none cterm=none
highlight Special ctermfg=4 ctermbg=none cterm=none highlight Special ctermfg=4 ctermbg=none cterm=none
highlight Identifier ctermfg=6 ctermbg=none cterm=none highlight Identifier ctermfg=6 ctermbg=none cterm=none
highlight PreProc ctermfg=5 ctermbg=none cterm=none highlight PreProc ctermfg=5 ctermbg=none cterm=none
highlight String ctermfg=12 ctermbg=none cterm=none highlight String ctermfg=12 ctermbg=none cterm=none
highlight Number ctermfg=1 ctermbg=none cterm=none highlight Number ctermfg=1 ctermbg=none cterm=none
highlight Function ctermfg=1 ctermbg=none cterm=none highlight Function ctermfg=1 ctermbg=none cterm=none
" highlight WildMenu ctermfg=0 ctermbg=80 cterm=none " highlight WildMenu ctermfg=0 ctermbg=80 cterm=none
" highlight Folded ctermfg=103 ctermbg=234 cterm=none " highlight Folded ctermfg=103 ctermbg=234 cterm=none
" highlight FoldColumn ctermfg=103 ctermbg=234 cterm=none " highlight FoldColumn ctermfg=103 ctermbg=234 cterm=none
@@ -138,7 +158,6 @@ let g:NERDTreeWinSize=38
" highlight htmlEndTag ctermfg=114 ctermbg=none cterm=none " highlight htmlEndTag ctermfg=114 ctermbg=none cterm=none
" highlight xmlEndTag ctermfg=114 ctermbg=none cterm=none " highlight xmlEndTag ctermfg=114 ctermbg=none cterm=none
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Vifm " => Vifm
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@@ -154,6 +173,19 @@ map <Leader>tv :TabVifm<CR>
let g:vimwiki_list = [{'path': '~/vimwiki/', let g:vimwiki_list = [{'path': '~/vimwiki/',
\ 'syntax': 'markdown', 'ext': '.md'}] \ 'syntax': 'markdown', 'ext': '.md'}]
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Vim-Instant-Markdown
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:instant_markdown_autostart = 0 " Turns off auto preview
let g:instant_markdown_browser = "surf" " Uses surf for preview
map <Leader>md :InstantMarkdownPreview<CR> " Previews .md file
map <Leader>ms :InstantMarkdownStop<CR> " Kills the preview
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Open terminal inside Vim
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
map <Leader>tt :vnew term://fish<CR>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Mouse Scrolling " => Mouse Scrolling
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@@ -164,14 +196,28 @@ set mouse=nicr
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set splitbelow splitright set splitbelow splitright
set path+=** " Searches current directory recursively. " Remap splits navigation to just CTRL + hjkl
set wildmenu " Display all matches when tab complete. nnoremap <C-h> <C-w>h
set incsearch nnoremap <C-j> <C-w>j
set nobackup nnoremap <C-k> <C-w>k
set noswapfile nnoremap <C-l> <C-w>l
let g:minimap_highlight='Visual' " Make adjusing split sizes a bit more friendly
noremap <silent> <C-Left> :vertical resize +3<CR>
noremap <silent> <C-Right> :vertical resize -3<CR>
noremap <silent> <C-Up> :resize +3<CR>
noremap <silent> <C-Down> :resize -3<CR>
" Change 2 split windows from vert to horiz or horiz to vert
map <Leader>th <C-w>t<C-w>H
map <Leader>tk <C-w>t<C-w>K
" Removes pipes | that act as seperators on splits
set fillchars+=vert:\
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Other Stuff
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:python_highlight_all = 1 let g:python_highlight_all = 1
au! BufRead,BufWrite,BufWritePost,BufNewFile *.org au! BufRead,BufWrite,BufWritePost,BufNewFile *.org
@@ -181,74 +227,3 @@ set guioptions-=m "remove menu bar
set guioptions-=T "remove toolbar set guioptions-=T "remove toolbar
set guioptions-=r "remove right-hand scroll bar set guioptions-=r "remove right-hand scroll bar
set guioptions-=L "remove left-hand scroll bar set guioptions-=L "remove left-hand scroll bar
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Removes pipes | that act as seperators on splits
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set fillchars+=vert:\
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"=> Trailing spaces
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! CleanExtraSpaces() "Function to clean unwanted spaces
let save_cursor = getpos(".")
let old_query = getreg('/')
silent! %s/\s\+$//e
call setpos('.', save_cursor)
call setreg('/', old_query)
endfun
autocmd BufWritePre * :call CleanExtraSpaces()
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"=> Convert text to UTF-8
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
setglobal termencoding=utf-8 fileencodings=
scriptencoding utf-8
set encoding=utf-8
autocmd BufNewFile,BufRead * try
autocmd BufNewFile,BufRead * set encoding=utf-8
autocmd BufNewFile,BufRead * endtry
"Going over all of this would take too much time
"This basically set everything in utf-8 in every circumtances
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"=> Convert to UNIX fileformat (avoid CRLF)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set fileformat=unix
"Set every files as Unix (LF) as Windows might set CRLF wich is not working
"for unix
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"=> Ignore 'useless' extensions for wildmenu
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set wildignore+=*.a,*.o,*.so,*.pyc,.git
set wildignore+=*.jpg,*.png,*.gif,*.bmp,*.ico,*.pdf
set wildignore+=*.tmp,*.swp
"Tell NerdTree and Popup windows ignore thoses
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"Set Vim Language
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let $LANG='en'
"Setting env LANG var to english
set langmenu=en
"Setting menu language to en
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
"Sourcing evrything ("don't why but you need to do it)