This is my vim configuration file. I have been using vim for a long time and
I have been using this configuration for a long time.
There are some requirements for this configuration to work properly. You need
to install the following binaries through cargo:
cargo install ripgrep
cargo install --locked bat
cargo install fd-find
The configuration file is as follows:
set nocompatible
call plug#begin('~/.vim/plugged')
" LIST OF PLUGINS
Plug 'MattesGroeger/vim-bookmarks'
Plug 'Shougo/vimproc.vim'
Plug 'NLKNguyen/papercolor-theme'
Plug 'WolfgangMehner/bash-support'
Plug 'WolfgangMehner/c-support'
Plug 'airblade/vim-gitgutter'
Plug 'alvan/vim-php-manual'
Plug 'beanworks/vim-phpfmt'
Plug 'brooth/far.vim'
Plug 'c9s/helper.vim'
Plug 'c9s/hypergit.vim'
Plug 'c9s/treemenu.vim'
Plug 'dense-analysis/ale'
Plug 'dvwallin/tiny-nofrils'
Plug 'easymotion/vim-easymotion'
Plug 'fatih/vim-go', { 'tag': '*' }
Plug 'godlygeek/tabular'
Plug 'iqxd/vim-mine-sweeping'
Plug 'itchyny/lightline.vim'
Plug 'josa42/vim-lightline-coc'
Plug 'jremmen/vim-ripgrep'
Plug 'junegunn/goyo.vim'
Plug 'justincampbell/vim-eighties'
Plug 'kana/vim-operator-user'
Plug 'kkga/vim-envy'
Plug 'kristijanhusak/vim-dadbod-ui'
Plug 'liuchengxu/vista.vim'
Plug 'matze/vim-move'
Plug 'maximbaz/lightline-ale'
Plug 'mg979/vim-visual-multi'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }
Plug 'ntpeters/vim-better-whitespace'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'ojroques/vim-scrollstatus'
Plug 'ollykel/v-vim'
Plug 'pechorin/any-jump.vim'
Plug 'preservim/nerdcommenter'
Plug 'preservim/tagbar'
Plug 'quintik/Snip'
Plug 'rhysd/vim-clang-format'
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'scrooloose/syntastic'
Plug 'sheerun/vim-polyglot'
Plug 'stephpy/vim-php-cs-fixer'
Plug 'sumpygump/php-documentor-vim'
Plug 'tpope/vim-dadbod'
Plug 'tpope/vim-fugitive'
Plug 'vim-crystal/vim-crystal'
Plug 'vim-php/tagbar-phpctags.vim'
Plug 'mcchrish/zenbones.nvim'
Plug 'github/copilot.vim'
if has('nvim') || has('patch-8.0.902')
Plug 'mhinz/vim-signify'
else
Plug 'mhinz/vim-signify', { 'branch': 'legacy' }
endif
call plug#end()
let mapleader = ","
if !has('gui_running')
set t_Co=256
endif
" NUMBER CONFIG
set number
set relativenumber
set mouse=a
" COLORS AND SYNTAX CONFIG
syntax on
set cc=80
set termguicolors
hi CursorLine gui=underline cterm=underline ctermfg=None guifg=None guibg=None
hi Search guibg=peru guifg=wheat
set t_Co=256
set background=dark
colorscheme PaperColor
" EDITING CONFIG
let g:better_whitespace_enabled=1
let g:strip_whitespace_on_save=1
let g:strip_whitespace_confirm=0
filetype plugin indent on
set autoindent expandtab tabstop=4 shiftwidth=4 smarttab
let g:crystal_auto_format = 1
let g:bookmark_sign = '😜'
" KEYBOARD SHORTCUTS
map ff Telescope find_files
map fg Telescope live_grep
map fb Telescope buffers
map fh Telescope help_tags
map yw yiw
map y viw
map v :VenterToggle
map g :Goyo
map id gg=G
map q :NERDTreeToggle
map r :source $HOME/.vimrc
nmap x :exec '!'.getline('.')
map c :vert bo new $HOME/.cmds
nmap w :TagbarToggle
map (easymotion-prefix)
inoremap
inoremap jk
au BufRead,BufNewFile *.php inoremap d :call PhpDoc()
au BufRead,BufNewFile *.php nnoremap d :call PhpDoc()
nnoremap pd :call PhpCsFixerFixDirectory()
nnoremap pf :call PhpCsFixerFixFile()
" PHP CONFIG
let g:syntastic_php_checkers = ['php']
let g:tagbar_phpctags_memory_limit = '512M'
let g:eighties_enabled = 1
let g:eighties_minimum_width = 86
let g:php_cs_fixer_rules = "@PSR2"
let g:php_cs_fixer_php_path = "php8"
let g:phpfmt_standard = 'PSR2'
let b:ale_linters = ['php', 'phpcs']
let g:ale_php_phpcs_executable='phpcs'
let g:ale_php_php_cs_fixer_executable='php-cs-fixer'
let g:ale_fixers = {'php': ['php-cs-fixer']}
" NEEDED DIRECTORIES
set backupdir=~/.vim/backup_files//
set directory=~/.vim/swap_files//
set undodir=~/.vim/undo_files//
" STATUS LINE
set laststatus=2
let g:lightline = {
\ 'active': {
\ 'right': [
\ ['lineinfo'],
\ ['percent'],
\ [
\ 'fileformat',
\ 'fileencoding',
\ 'filetype',
\ 'charvaluehex'
\ ]
\ ],
\ 'left': [
\ [
\ 'coc_info',
\ 'coc_hints',
\ 'coc_errors',
\ 'coc_warnings',
\ 'coc_ok'
\ ],
\ [ 'coc_status']
\ ]
\ },
\ 'component_function': {'percent': 'ScrollStatus'},
\ 'colorscheme': 'one',
\ }