Skip to content

Instantly share code, notes, and snippets.

@nirnejak
Last active June 2, 2024 04:55
Show Gist options
  • Save nirnejak/58b28365522bddcd192f605e132fb60a to your computer and use it in GitHub Desktop.
Save nirnejak/58b28365522bddcd192f605e132fb60a to your computer and use it in GitHub Desktop.
call plug#begin('~/.vim/plugged')
Plug 'mxw/vim-jsx'
Plug 'pangloss/vim-javascript'
Plug 'ap/vim-css-color'
Plug 'mattn/emmet-vim' " <C-y> + , for completion
Plug 'matze/vim-move'
Plug 'prettier/vim-prettier', { 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'graphql', 'markdown', 'vue', 'yaml', 'html'] }
Plug 'eslint/eslint'
" npm i -g prettier
Plug 'scrooloose/nerdtree'
Plug 'yggdroot/indentline'
Plug 'sakshamgupta05/vim-todo-highlight'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'ryanoasis/vim-devicons'
Plug '1612492/github.vim'
Plug 'tpope/vim-fugitive'
Plug 'apzelos/blamer.nvim'
Plug 'airblade/vim-gitgutter'
Plug 'junegunn/fzf'
" brew install fzf fd bat
set rtp+=/opt/homebrew/opt/fzf
call plug#end()
" ----------------------
" Vim Plug Guide
" ----------------------
" :Run :PlugInstall after Updating the file
" :Run :PlugClean after removing the Plugin from ~/.vimrc
" :Run :PlugUpdate to update the packages
" :Run :PlugUpgrade to upgrade the vim-plug
" ---------------------
" Vim Javascript Settings
" ---------------------
let g:javascript_plugin_jsdoc = 1
" ----------------------
" NERDTree Settings
" ----------------------
let NERDTreeShowHidden=1
let NERDTreeMinimalUI=1
let NERDTreeIgnore=['\.DS_Store$', '\.git$', '\.node_modules$'] " ignore files in nerd tree
let NERDTreeStatusline = ''
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | wincmd w | endif
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" ---------------------
" Theme Settings
" ---------------------
if (has("termguicolors"))
set termguicolors
endif
syntax enable
syntax on
set background=dark
colorscheme github
let g:airline_theme = 'dark_dimmed'
" -----------------------
" Indentline Settings
" -----------------------
let g:indentLine_char = '▏'
let g:indentLine_leadingSpaceChar = ' '
let g:indentLine_leadingSpaceEnabled = 1
" ----------------------
" Vim Move Settings
" ----------------------
let g:move_key_modifier = 'C'
" Hit Control and arrow keys to move a line
" -----------------------
" TODO Highlight Config
" -----------------------
let g:todo_highlight_config = {
\ 'TODO': {
\ 'gui_fg_color': '#ffffff',
\ 'gui_bg_color': '#FF4081',
\ 'cterm_fg_color': 'white',
\ 'cterm_bg_color': '95'
\ },
\ 'INFO': {
\ 'gui_fg_color': '#ffffff',
\ 'gui_bg_color': '#189BF8',
\ 'cterm_fg_color': 'white',
\ 'cterm_bg_color': '214'
\ }
\ }
" ---------------------
" GitBlamer Settings
" ---------------------
let g:blamer_enabled = 1
" ----------------------
" Fugitive Settings
" ----------------------
nmap <leader>gh :diffget //3<CR>
nmap <leader>gu :diffget //2<CR>
nmap <leader>gs :G<CR>
" --------------------
" Keybindings
" --------------------
map <C-b> :NERDTreeToggle<CR>
" Ctrl+N will toggle NerdTree
map <C-p> :FZF<CR>
" Ctrl+P will toggle FZF Fuzzy Finder
map <S-f> :Prettier<CR>
" Shift+F format document
" --------------------
" Spell Check Configurations
" --------------------
set spelllang=en_us
set spell
hi SpellBad guibg=#324c59 ctermbg=224 cterm=bold,underline
hi SpellCap guibg=#324c59 ctermbg=224 cterm=bold,underline
hi SpellRare guibg=#324c59 ctermbg=224 cterm=bold,underline
hi SpellLocal guibg=#324c59 ctermbg=224 cterm=bold,underline
" --------------------
" Cursor Line Configurations
" --------------------
set cursorline
hi CursorLine term=bold cterm=NONE ctermbg=darkred ctermfg=white gui=bold
hi CursorLineNr term=bold cterm=NONE ctermbg=darkred ctermfg=white gui=bold
" --------------------
" Other Configurations
" --------------------
set number
set tabstop=2
set shiftwidth=2
set expandtab
set smarttab
set noswapfile
set undodir=~/.vim/undo
set undofile
set incsearch
" :hi to get the list of all the variables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment