Last active
September 30, 2021 11:23
-
-
Save Jayonics/732c26752edc4e1ef7980afde3ca05c1 to your computer and use it in GitHub Desktop.
vim
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
" Turn off filetype and turn it on after plugins are loaded" | |
filetype off | |
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 'neoclide/coc.nvim', {'branch':'release'} | |
Plug 'WolfgangMehner/bash-support' | |
Plug 'altercation/vim-colors-solarized' | |
Plug 'itchyny/lightline.vim' | |
Plug 'dense-analysis/ale' | |
Plug 'frazrepo/vim-rainbow' | |
Plug 'djoshea/vim-autoread' | |
" NERDTree plugins | |
Plug 'scrooloose/nerdtree' | |
Plug 'scrooloose/nerdtree-project-plugin' | |
Plug 'Xuyuanp/nerdtree-git-plugin' | |
Plug 'airblade/vim-gitgutter' | |
Plug 'tiagofumo/vim-nerdtree-syntax-highlight' | |
Plug 'ryanoasis/vim-devicons' | |
Plug 'PhilRunninger/nerdtree-visual-selection' | |
Plug 'ctrlpvim/ctrlp.vim' " fuzzy find files | |
Plug 'christoomey/vim-tmux-navigator' | |
" Shebang matching | |
Plug 'vitalk/vim-shebang' | |
" Project/Workspace based config plugins | |
Plug 'embear/vim-localvimrc' | |
Plug 'editorconfig/editorconfig-vim' | |
" BIND9 Syntax highlighting | |
Plug 'egberts/vim-syntax-bind-named' | |
call plug#end() | |
" LocalVimRc options | |
let g:localvimrc_enable=1 | |
let g:localvimrc_sandbox=0 | |
let g:localvimrc_ask=0 | |
" NERDTREE SIDEBAR " | |
" Open Automatically | |
autocmd VimEnter * NERDTree | wincmd p | |
" Keybinds | |
nmap <C-n> :NERDTreeToggle<CR> | |
nnoremap <C-f> :NERDTreeFind<CR> | |
" Exit vim if NERDTree is the only window left. | |
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | | |
\ quit | endif | |
" Always show hidden files | |
let NERDTreeShowHidden=1 | |
" CUSTOM COMMANDS BELOW " | |
" For plugins to load correctly | |
filetype plugin indent on | |
" Turn off modelines (idk what this is) | |
set modelines=0 | |
" Automatically wrap lines | |
set wrap | |
" Vim's auto indentation feature does not work properly with text copied from outside of Vim. Press the <F2> key to toggle paste mode on/off. | |
nnoremap <F2> :set invpaste paste?<CR> | |
imap <F2> <C-O>:set invpaste paste?<CR> | |
set pastetoggle=<F2> | |
" Display 10 lines above/below the cursor when scrolling with a mouse. | |
set scrolloff=10 | |
" Fixes common backspace problems | |
set backspace=indent,eol,start | |
" Enable faster scrolling | |
set ttyfast | |
" File encoding - Ignored as I'm not sure of the consequences with ascii | |
" files, I'ves had no issues with vim made files so far no need to change | |
" until I have more knowledge with vim. | |
"set encoding=utf-8 | |
" CUSTOM COMMANDS ABOVE " | |
" START OF COLOR SCHEME " | |
" Solarized theme | |
" Set term colors based on TERM env | |
" if $TERM == "xterm-256color" | |
" " echom "Using xterm-256" | |
" let g:solarized_termcolors=256 | |
" elseif $TERM == "xterm-16color" | |
" " echom "Using 16 peice ANSI Color table" | |
" let g:solarized_termcolors=16 | |
" elseif $TERM == "xterm-color" | |
" " echom "Using legacy 8 peice Color table" | |
" unlet g:solarized_termcolors | |
" elseif $TERM == "xterm" | |
" " echom "Using 16 peice ANSI Color table" | |
" let g:solarized_termcolors=16 | |
" endif | |
let g:solarized_termcolors=16 | |
let g:solarized_visibility="high" | |
let g:solarized_termtrans=1 | |
let g:solarized_contrast="high" | |
let g:solarized_visibility="high" | |
let g:solarized_bold=1 | |
let g:solarized_italic=1 | |
let g:solarized_underline=1 | |
syntax enable | |
set background=dark | |
colorscheme solarized | |
" END OF COLOR SCHEME " | |
"use lightline | |
set laststatus=2 | |
"ale linting | |
let g:rainbow_active = 1 | |
let g:is_bash=1 | |
"filetype on | |
"filetype plugin on | |
"filetype indent on | |
set number | |
"autocmd BufNewFile,BufRead *.conf set syntax=conf | |
"autocmd BufNewFile,BufRead *.conf set filetype=conf | |
autocmd BufNewFile,BufRead *.log set syntax=log | |
autocmd BufNewFile,BufRead *.log set filetype=log | |
set autoread | |
au CursorHold * checktime |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment