" testing " ============================================================================ " DEFAULT LOCATION FOR MANJARO " ============================================================================ " ~/.vim/vimrc " ============================================================================ " REQUIREMENTS / DEPENDENCIES " ============================================================================ " - git " - vim-plug " - fzf " - nerd fonts " - powerline " - yarn " - npm " - autopep8 " ============================================================================ " PLUGINS " ============================================================================ " Plugins will be downloaded under the specified directory. if has('nvim') call plug#begin('~/.config/nvim/plugged') else call plug#begin('~/.vim/plugged') endif " Override configs by directory " Plug 'arielrossanigo/dir-configs-override.vim' " Code commenter " Plug 'scrooloose/nerdcommenter' " Better file browser Plug 'scrooloose/nerdtree' " Airline Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' " File Fuzzy Finder Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf.vim' " Eclipse TaskList Plug 'fisadev/FixedTaskList.vim' " Plug 'vim-scripts/TaskList.vim' " Deoplete if has('nvim') Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } else Plug 'Shougo/deoplete.nvim' Plug 'roxma/nvim-yarp' Plug 'roxma/vim-hug-neovim-rpc' endif " intellisense (autocompletion) engine for vim8 & neovim. " Plug 'neoclide/coc.nvim', {'branch': 'release'} " Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'} " Plug 'neoclide/coc.nvim', {'do': { -> coc#util#install()}} " MUST INSTALL CocInstall coc-lists coc-marketplace " THEN CocList marketplace TO INSTALL THE REST EXTENSIONS " A universal set of defaults that (hopefully) everyone can agree on Plug 'tpope/vim-sensible' " Comment stuff out Plug 'tpope/vim-commentary' " quoting/parenthesis made simple Plug 'tpope/vim-surround' " Automatically close parenthesis, etc Plug 'Townk/vim-autoclose' " Format code with one button press (or automatically on save). " Plug 'Chiel92/vim-autoformat' " continuously updated session files Plug 'tpope/vim-obsession' " Git integration Plug 'tpope/vim-fugitive' " Shows a git diff in the gutter (sign column) and stages/undoes hunks. Plug 'airblade/vim-gitgutter' " Better language packs Plug 'sheerun/vim-polyglot' " Displaying thin vertical lines at each indentation level " Plug 'Yggdroot/indentLine' " Indent Guides is a plugin for visually displaying indent levels in Vim. Plug 'nathanaelkane/vim-indent-guides' " useful overview of the code as a minimap sidebar. Plug 'severin-lemaignan/vim-minimap' " Large collection of vim colorschemes " Plug 'flazz/vim-colorschemes' Plug 'dracula/vim', { 'as': 'dracula' } " A simple tool for presenting slides in vim based on text files. Plug 'sotte/presenting.vim' " Vim plugin for LaTeX " Plug 'lervag/vimtex' " Distraction-free writing in Vim. Plug 'junegunn/goyo.vim' " Vim plugin for .tmux.conf Plug 'tmux-plugins/vim-tmux' " Adds icons to vim plugins Plug 'ryanoasis/vim-devicons' " List ends here. Plugins become visible to Vim after this call. call plug#end() " ============================================================================ " GLOBAL CONFIGURATION " ============================================================================ " enable syntax highlighting (previously syntax on). syntax enable " set the window’s title, reflecting the file currently being edited. set title " Use an encoding that supports Unicode. set encoding=utf-8 " show the line number set number " show the relative number set relativenumber " show cursor line set cursorline " Always show cursor position. set ruler " when scrolling, keep cursor 5 lines away from screen border set scrolloff=5 " show the tab bar set showtabline=2 " makes copy and paste work better set clipboard=unnamedplus " automatic indentation set autoindent set smartindent " use spaces instead of tabs set expandtab set tabstop=4 set softtabstop=4 set shiftwidth=4 " place a vertical line as a marker for maximum prescribed text width " set textwidth=79 " set colorcolumn=+1 " use tabs at the start of a line, spaces elsewhere set smarttab " don't wrap text set nowrap " don't fold code set nofoldenable " make completion smarter. set ignorecase set smartcase " Automatically re-open files after they have changed without prompting. set autoread " disable beep on errors. set noerrorbells " [DISABLED] flash the screen instead of beeping on errors. set novisualbell set termguicolors " needed so deoplete can auto select the first suggestion set completeopt+=noinsert " comment this line to enable autocompletion preview window " (displays documentation related to the selected completion option) set completeopt-=preview " autocompletion of files and commands behaves like shell " (complete only the common part, list the options that match) set wildmode=list:longest " fix problems with uncommon shells (fish, xonsh) and plugins running commands " (neomake, ...) set shell=/bin/bash " if hidden is not set, TextEdit might fail. set hidden " Better display for messages set cmdheight=2 " Smaller updatetime for CursorHold & CursorHoldI set updatetime=300 " don't give |ins-completion-menu| messages. set shortmess+=c " always show signcolumns set signcolumn=yes " enable mouse set mouse=a " ============================================================================ " CUSTOM MAPPINGS " ============================================================================ " Disable arrow keys noremap noremap noremap noremap " tab navigation mappings map tt :tabnew map :tabn imap :tabn map :tabp imap :tabp " clear search results nnoremap // :noh " ============================================================================ " DOEPLETE CONFIGURATION " ============================================================================ let g:deoplete#enable_at_startup = 1 " ============================================================================ " COC CONFIGURATION " ============================================================================ " Use tab for trigger completion with characters ahead and navigate. " Use command ':verbose imap ' to make sure tab is not mapped by other plugin. " inoremap " \ pumvisible() ? "\" : " \ check_back_space() ? "\" : " \ coc#refresh() " inoremap pumvisible() ? "\" : "\" " function! s:check_back_space() abort " let col = col('.') - 1 " return !col || getline('.')[col - 1] =~# '\s' " endfunction " " Use for trigger completion. " inoremap coc#refresh() " " Use for confirm completion, `u` means break undo chain at current position. " " Coc only does snippet and additional edit on confirm. " inoremap pumvisible() ? "\" : "\u\" " " coc-prettier " " command! -nargs=0 Prettier :CocCommand prettier.formatFile " ============================================================================ " FZF CONFIGURATION " ============================================================================ nnoremap :FZF " ============================================================================ " TASKLIST CONFIGURATION " ============================================================================ " show pending tasks list map :TaskList " ============================================================================ " NERDTREE CONFIGURATION " ============================================================================ " automatically open nerdtree when no file name specified " autocmd StdinReadPre * let s:std_in=1 " autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif " toggle nerdtree display map :NERDTreeToggle " open nerdtree with the current file selected nmap ,t :NERDTreeFind " don;t show these file types let NERDTreeIgnore = ['\.pyc$', '\.pyo$'] " " ============================================================================ " " NERDCOMMENTER CONFIGURATION " " ============================================================================ " " Add spaces after comment delimiters by default " let g:NERDSpaceDelims = 1 " " Use compact syntax for prettified multi-line comments " let g:NERDCompactSexyComs = 1 " " Align line-wise comment delimiters flush left instead of following code indentation " let g:NERDDefaultAlign = 'left' " ============================================================================ " AUTOCLOSE ISORT CONFIGURATION " ============================================================================ " Fix to let ESC work as espected with Autoclose plugin " (without this, when showing an autocompletion window, ESC won't leave insert " mode) let g:AutoClosePumvisible = {"ENTER": "\", "ESC": "\"} " ============================================================================ " ISORT CONFIGURATION " ============================================================================ " let g:vim_isort_python_version = 'python3' " ============================================================================ " MINIMAP CONFIGURATION " ============================================================================ let g:minimap_show='ms' let g:minimap_update='mu' let g:minimap_close='gc' let g:minimap_toggle='gt' let g:minimap_highlight='Visual' " ============================================================================ " AIRLINE CONFIGURATION " ============================================================================ " set airline theme " let g:airline_theme = 'wombat' " let g:airline_theme = 'onedark' let g:airline_theme = 'dracula' " let g:airline_theme = 'base16' " displays all buffers when there's only one tab open let g:airline#extensions#tabline#enabled = 1 " separators can be configured independently for the tablne let g:airline#extensions#tabline#left_sep = ' ' let g:airline#extensions#tabline#left_alt_sep = '|' " populate the g:airline_symbols dictionary with the powerline symbols let g:airline_powerline_fonts = 1 " ============================================================================ " INDENTLINE CONFIGURATION " ============================================================================ " " customize conceal color " let g:indentLine_color_term = 239 " " customize conceal color " " let g:indentLine_char_list = ['|', '¦', '┆', '┊'] " let g:indentLine_char_list = ['┊'] " ============================================================================ " INDENTGUIDE CONFIGURATION " ============================================================================ let g:indent_guides_enable_on_vim_startup = 1 let g:indent_guides_start_level = 1 let g:indent_guides_auto_colors = 1 let g:indent_guides_color_change_percent = 10 let g:indent_guides_space_guides = 1 let g:indent_guides_tab_guides = 1 let g:indent_guides_guide_size = 1 let g:indent_guides_exclude_filetypes = ['help', 'nerdtree', 'startify', 'Preview','__doc__','rst'] " ============================================================================ " COLORSCHEME CONFIGURATION " ============================================================================ " colorscheme kolor " coloscheme space-vim-dark colorscheme dracula " let g:seoul256_background = 234 " colorscheme seoul256 " colorscheme seti " colorscheme darkspectrum " colorscheme wombat " colorscheme spacegray " colorscheme codedark " colorscheme gruvbox " colorscheme nord " ============================================================================ " AUTOFORMAT CONFIGURATION " ============================================================================ " Autoformat upon saving file " autocmd BufWrite * :Autoformat " " enable/diable verbose mode " let g:autoformat_verbosemode=0 " ============================================================================ " VIMTEX CONFIGURATION " ============================================================================ let g:tex_flavor='latex' let g:vimtex_view_method='zathura' let g:vimtex_quickfix_mode=0 set conceallevel=1 let g:tex_conceal='abdmg' " ============================================================================ " VIM_DEV_ICONS CONFIGURATION " ============================================================================ " loading the plugin let g:webdevicons_enable = 1 " adding the flags to NERDTree let g:webdevicons_enable_nerdtree = 1 " adding the custom source to unite let g:webdevicons_enable_unite = 1 " adding the column to vimfiler let g:webdevicons_enable_vimfiler = 1 " adding to vim-airline's tabline let g:webdevicons_enable_airline_tabline = 1 " adding to vim-airline's statusline let g:webdevicons_enable_airline_statusline = 1 " ctrlp glyphs let g:webdevicons_enable_ctrlp = 1 " adding to vim-startify screen let g:webdevicons_enable_startify = 1 " adding to flagship's statusline let g:webdevicons_enable_flagship_statusline = 1 " turn on/off file node glyph decorations (not particularly useful) let g:WebDevIconsUnicodeDecorateFileNodes = 1 " use double-width(1) or single-width(0) glyphs " only manipulates padding, has no effect on terminal or set(guifont) font let g:WebDevIconsUnicodeGlyphDoubleWidth = 1 " whether or not to show the nerdtree brackets around flags let g:webdevicons_conceal_nerdtree_brackets = 1 " the amount of space to use after the glyph character (default ' ') let g:WebDevIconsNerdTreeAfterGlyphPadding = ' ' " Force extra padding in NERDTree so that the filetype icons line up vertically let g:WebDevIconsNerdTreeGitPluginForceVAlign = 1 " Adding the custom source to denite let g:webdevicons_enable_denite = 1