Fixing my vimrc to match nvim config.
This commit is contained in:
parent
a8a3ee798c
commit
b5929750bc
|
@ -1,5 +1,5 @@
|
|||
[geometry]
|
||||
posx=1920
|
||||
posx=3840
|
||||
posy=21
|
||||
sizex=1920
|
||||
sizey=1059
|
||||
|
|
245
.vimrc
245
.vimrc
|
@ -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
|
||||
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
|
||||
Plugin 'itchyny/lightline.vim' " Lightline statusbar
|
||||
Plugin 'vifm/vifm.vim'
|
||||
Plugin 'vimwiki/vimwiki' " Vim wiki
|
||||
Plugin 'scrooloose/nerdtree' " added nerdtree
|
||||
Plugin 'tiagofumo/vim-nerdtree-syntax-highlight'
|
||||
Plugin 'ryanoasis/vim-devicons'
|
||||
Plugin 'frazrepo/vim-rainbow'
|
||||
Plugin 'vim-python/python-syntax'
|
||||
Plugin 'jreybert/vimagit'
|
||||
Plugin 'severin-lemaignan/vim-minimap'
|
||||
Plugin 'ap/vim-css-color' " Color previews for CSS
|
||||
Plugin 'tpope/vim-surround' " Change surrounding marks
|
||||
"{{ The Basics }}
|
||||
Plug 'gmarik/Vundle.vim' " Vundle
|
||||
Plug 'itchyny/lightline.vim' " Lightline statusbar
|
||||
Plug 'suan/vim-instant-markdown', {'rtp': 'after'} " Markdown Preview
|
||||
Plug 'frazrepo/vim-rainbow'
|
||||
"{{ File management }}
|
||||
Plug 'vifm/vifm.vim' " Vifm
|
||||
Plug 'scrooloose/nerdtree' " Nerdtree
|
||||
Plug 'tiagofumo/vim-nerdtree-syntax-highlight' " Highlighting Nerdtree
|
||||
Plug 'ryanoasis/vim-devicons' " Icons for Nerdtree
|
||||
"{{ Productivity }}
|
||||
Plug 'vimwiki/vimwiki' " VimWiki
|
||||
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
|
||||
" To ignore plugin indent changes, instead use:
|
||||
"filetype plugin on
|
||||
" filetype plugin on
|
||||
|
||||
" Brief help
|
||||
" :PluginList - lists configured plugins
|
||||
|
@ -39,15 +55,31 @@ filetype plugin indent on " required
|
|||
" see :h vundle for more details or wiki for FAQ
|
||||
" 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 ESC to ii
|
||||
" Remap ESC to ii
|
||||
:imap ii <Esc>
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Powerline
|
||||
" => Status Line
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" The lightline.vim theme
|
||||
let g:lightline = {
|
||||
\ 'colorscheme': 'darcula',
|
||||
\ }
|
||||
|
@ -55,28 +87,16 @@ let g:lightline = {
|
|||
" Always show statusline
|
||||
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.
|
||||
set noshowmode
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Text, tab and indent related
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Use spaces instead of tabs
|
||||
set expandtab
|
||||
|
||||
" Be smart when using tabs ;)
|
||||
set smarttab
|
||||
|
||||
" 1 tab == 4 spaces
|
||||
set shiftwidth=4
|
||||
set tabstop=4
|
||||
set expandtab " Use spaces instead of tabs.
|
||||
set smarttab " Be smart using tabs ;)
|
||||
set shiftwidth=4 " One tab == four spaces.
|
||||
set tabstop=4 " One tab == four spaces.
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => NERDTree
|
||||
|
@ -92,25 +112,25 @@ let NERDTreeMinimalUI = 1
|
|||
let g:NERDTreeWinSize=38
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Colors
|
||||
" => Colors and Theming
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
highlight LineNr ctermfg=8 ctermbg=none cterm=none
|
||||
highlight CursorLineNr ctermfg=7 ctermbg=8 cterm=none
|
||||
highlight VertSplit ctermfg=0 ctermbg=8 cterm=none
|
||||
highlight Statement ctermfg=2 ctermbg=none cterm=none
|
||||
highlight Directory ctermfg=4 ctermbg=none cterm=none
|
||||
highlight StatusLine ctermfg=7 ctermbg=8 cterm=none
|
||||
highlight StatusLineNC ctermfg=7 ctermbg=8 cterm=none
|
||||
highlight NERDTreeClosable ctermfg=2
|
||||
highlight NERDTreeOpenable ctermfg=8
|
||||
highlight Comment ctermfg=4 ctermbg=none cterm=none
|
||||
highlight Constant ctermfg=12 ctermbg=none cterm=none
|
||||
highlight Special ctermfg=4 ctermbg=none cterm=none
|
||||
highlight Identifier ctermfg=6 ctermbg=none cterm=none
|
||||
highlight PreProc ctermfg=5 ctermbg=none cterm=none
|
||||
highlight String ctermfg=12 ctermbg=none cterm=none
|
||||
highlight Number ctermfg=1 ctermbg=none cterm=none
|
||||
highlight Function ctermfg=1 ctermbg=none cterm=none
|
||||
highlight LineNr ctermfg=8 ctermbg=none cterm=none
|
||||
highlight CursorLineNr ctermfg=7 ctermbg=8 cterm=none
|
||||
highlight VertSplit ctermfg=0 ctermbg=8 cterm=none
|
||||
highlight Statement ctermfg=2 ctermbg=none cterm=none
|
||||
highlight Directory ctermfg=4 ctermbg=none cterm=none
|
||||
highlight StatusLine ctermfg=7 ctermbg=8 cterm=none
|
||||
highlight StatusLineNC ctermfg=7 ctermbg=8 cterm=none
|
||||
highlight NERDTreeClosable ctermfg=2
|
||||
highlight NERDTreeOpenable ctermfg=8
|
||||
highlight Comment ctermfg=4 ctermbg=none cterm=italic
|
||||
highlight Constant ctermfg=12 ctermbg=none cterm=none
|
||||
highlight Special ctermfg=4 ctermbg=none cterm=none
|
||||
highlight Identifier ctermfg=6 ctermbg=none cterm=none
|
||||
highlight PreProc ctermfg=5 ctermbg=none cterm=none
|
||||
highlight String ctermfg=12 ctermbg=none cterm=none
|
||||
highlight Number ctermfg=1 ctermbg=none cterm=none
|
||||
highlight Function ctermfg=1 ctermbg=none cterm=none
|
||||
" highlight WildMenu ctermfg=0 ctermbg=80 cterm=none
|
||||
" highlight Folded 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 xmlEndTag ctermfg=114 ctermbg=none cterm=none
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Vifm
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
@ -154,6 +173,19 @@ map <Leader>tv :TabVifm<CR>
|
|||
let g:vimwiki_list = [{'path': '~/vimwiki/',
|
||||
\ '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
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
@ -164,14 +196,28 @@ set mouse=nicr
|
|||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
set splitbelow splitright
|
||||
|
||||
set path+=** " Searches current directory recursively.
|
||||
set wildmenu " Display all matches when tab complete.
|
||||
set incsearch
|
||||
set nobackup
|
||||
set noswapfile
|
||||
" Remap splits navigation to just CTRL + hjkl
|
||||
nnoremap <C-h> <C-w>h
|
||||
nnoremap <C-j> <C-w>j
|
||||
nnoremap <C-k> <C-w>k
|
||||
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
|
||||
|
||||
au! BufRead,BufWrite,BufWritePost,BufNewFile *.org
|
||||
|
@ -181,74 +227,3 @@ set guioptions-=m "remove menu bar
|
|||
set guioptions-=T "remove toolbar
|
||||
set guioptions-=r "remove right-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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue