My personal .vimrc file with many useful plugins.
- I'm using macOS its version : Catalina 10.15.5
- I uploaded it to backup my config. Do not ever use my .vimrc file, it is chaotic 🤯
Check these out to get better results :
https://github.com/amix/vimrc,
https://devhints.io/vimscript
Make your own or try to get it from the link above.
- YouCompleteMe
- delimitMate
- indentLine
- Vundle.vim
- Dracula
- OpenGL
- Zenburn
- lua-support
- vim-lua-ftplugin
- vim-misc
- vim-airline-themes
- indentpython.vim
- ctrlp
- vim-codefmt
- vim-glaive
- vim-maktaba
- nerdtree
- tagbar
- vim-airline
- syntastic
- SimpylFold
- vim-flake8
- gruvbox
- vim-glsl
- vim-fugitive
- vim-todo-lists
Leader key is comma (",")
Toggle NERDTree:
map <F2> :NERDTreeToggle <CR>
Run .py files:
map <buffer> <F9> :w<CR>:exec '!python3' shellescape(@%, 1) <CR>
Delete all buffers except current one:
nmap <buffer> <leader>bb :BufOnly <CR>
Open .vimrc in a new tab:
nmap <silent> <leader>vr :tabnew $MYVIMRC<CR>
Go to definiton Ycm:
map <leader>g :YcmCompleter GoToDefinitionElseDeclaration <CR>
Biggest advantage is my config is that to run lua scripts and launch love in vim with a single keystroke, and every time you run script, command window will be cleared. It works well. There is a plugin with 105 LOC and it is probably better solution but i didn't get the code well (i am newbie) and tried to make my own and it took only 2 lines of code.
Do not forget to set $PATH variable for love2d.
Press to launch love
Let's say, your buffer's path is ~/Desktop/game/main.lua
and it will run love ~/Desktop/game/
that's it.
au Filetype lua nmap <buffer> <F5> :call RunLove() <CR>
au Filetype lua nmap <buffer> <F10> :call LuaExecCurrent() <CR>
RunLove function does the job for love and LuaExecCurrent will run any lua script.
Both execute ClearCmdWin() function which clears current terminal's window.
function RunLove()
call ClearCmdwin()
lcd %:p:h
!love `pwd`
endfunction
function ClearCmdwin()
silent !clear
redraw!
endfunction
function! LuaExecCurrent()
call ClearCmdwin()
w expand("%")
execute ":!lua" exists("g:mainfile") ? g:mainfile : expand("%")
endfunction
Lua scripts remember love functions by the dictionary, click below to download.
Dictionary Link
Put dictionary file under the .vim/love-dictionary/ directory.
There are screenshots of environments with different colorschemes. I've installed same vim plugins on macOS and ubuntu.
Here is the results of my .vimrc configuration on two different OS.
Color Schemes
- Onedark
- Gruvbox
- Koehler
- Zenburn
- Dracula
Create a file with .todo extension, leave the rest to plugin.
I added those lines to .vimrc to insert date automatically when a task is created:
let g:VimTodoListsDatesEnabled = 1
let g:VimTodoListsDatesFormat = "%a %d, %Y"
Baddest text editor on the planet!