An open API service indexing awesome lists of open source software.

https://github.com/arthurealike/vimconfig

My personal .vimrc file with many useful plugins.
https://github.com/arthurealike/vimconfig

Last synced: 3 months ago
JSON representation

My personal .vimrc file with many useful plugins.

Awesome Lists containing this project

README

        

# :sunglasses: vimconfig
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_ :exploding_head:

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.

![Alt text](pngs/macOS/Screen%20Shot%20Latest.png
"vim-unity-lua-love2d-main")

### Color Cheatsheet (Xterm)
[List of 256 colors](https://jonasjacek.github.io/colors/)

### Plugins

* [YouCompleteMe](https://github.com/ycm-core/YouCompleteMe)

* [delimitMate](https://github.com/Raimondi/delimitMate)

* [indentLine](https://github.com/Yggdroot/indentLine)

* [Vundle.vim](https://github.com/VundleVim/Vundle.vim)

* [Dracula](https://github.com/dracula/vim)
* [OpenGL](https://github.com/beyondmarc/opengl.vim)
* [Zenburn](https://github.com/jnurmine/Zenburn)
* [lua-support](https://github.com/wolfgangmehner/lua-support)
* [vim-lua-ftplugin](https://github.com/xolox/vim-lua-ftplugin)
* [vim-misc](https://github.com/xolox/vim-misc)
* [vim-airline-themes](https://github.com/vim-airline/vim-airline-themes)
* [indentpython.vim](https://github.com/vim-scripts/indentpython.vim)
* [ctrlp](https://github.com/kien/ctrlp.vim)
* [vim-codefmt](https://github.com/google/vim-codefmt)

* [vim-glaive](https://github.com/google/vim-glaive)

* [vim-maktaba](https://github.com/google/vim-maktaba)

* [nerdtree](https://github.com/preservim/nerdtree)

* [tagbar](https://github.com/majutsushi/tagbar)

* [vim-airline](https://github.com/vim-airline/vim-airline)

* [syntastic](https://github.com/vim-airline/vim-airline)

* [SimpylFold](https://github.com/tmhedberg/SimpylFold)

* [vim-flake8](https://github.com/nvie/vim-flake8)

* [gruvbox](https://github.com/morhetz/gruvbox)

* [vim-glsl](https://github.com/tikhomirov/vim-glsl)

* [vim-fugitive](https://github.com/tpope/vim-fugitive)

* [vim-todo-lists](https://github.com/aserebryakov/vim-todo-lists)

## Key Mappings
**Leader** key is comma (",")

Toggle NERDTree:

```vim
map :NERDTreeToggle
```

Run .py files:

```vim
map :w:exec '!python3' shellescape(@%, 1)
```

Delete all buffers except current one:

```vim
nmap bb :BufOnly
```

Open .vimrc in a new tab:

```vim
nmap vr :tabnew $MYVIMRC
```

Go to definiton Ycm:
```vim
map g :YcmCompleter GoToDefinitionElseDeclaration
```


# Love2d (Löve) & Lua support
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](https://gist.github.com/davisdude/0f46c9c00917fc5c53bb) 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.



### Key Mappings

```vim
au Filetype lua nmap :call RunLove()
```
```vim
au Filetype lua nmap :call LuaExecCurrent()
```


RunLove function does the job for love and LuaExecCurrent will run any lua script.

Both execute ClearCmdWin() function which clears current terminal's window.

### Functions
```vim
function RunLove()
call ClearCmdwin()
lcd %:p:h
!love `pwd`
endfunction
```
```vim
function ClearCmdwin()
silent !clear
redraw!
endfunction
```
```vim
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](https://raw.githubusercontent.com/josefnpat/dotfiles/master/config/vim/vim/love-dictionary/love.dict)


Put dictionary file under the .vim/love-dictionary/ directory.

## ScreenShots

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

# macOS

### Gruvbox

![Alt text](pngs/macOS/Screen%20Shot%20Gruvbox%20Single%202020-06-27%20at%20Latest.png
"vim-gruvbox-single")

![Alt text](pngs/macOS/Screen%20Shot%20Gruvbox%20Split%20Windows%202020-06-27%20at%20Latest.png
"vim-gruvbox-splitw")

### Onedark

![Alt text](pngs/macOS/Screen%20Shot%20OneDark%20Single(VISUAL)%202020%20at%20Latest.png
"vim-onedark-single")

### Koehler

![Alt text](pngs/macOS/Screen%20Shot%20Koehler%20Single%20Latest%20at%20Latest.png
"vim-koehler-single")

### Zenburn

![Alt text](pngs/macOS/Screen%20Shot%20Zenburn%20Single%202020-06-27%20at%20Latest.png
"vim-zenburn-single")

# Ubuntu

## Gruvbox

![Alt text](pngs/ubuntu/Screenshot%20from%20linux(0).png
"linux0")

## Koehler

![Alt text](pngs/ubuntu/Screenshot%20from%20linux(1).png
"linux0")

## Zenburn

![Alt text](pngs/ubuntu/Screenshot%20from%20linux(2).png
"linux0")

## Onedark
![Alt text](pngs/ubuntu/Screenshot%20from%20linux(3).png
"linux0")

## Dracula
![Alt text](pngs/ubuntu/Screenshot%20from%20linux(4).png
"linux0")

# *STRONGLY* recommended plugin
## [vim-todo-lists is a Vim plugin for TODO lists management.](https://github.com/aserebryakov/vim-todo-lists)
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"`

![Alt text](pngs/macOS/main/Screen%20Shot%20todo%20at%20Latest.png
"vim-todo-main")

***Baddest text editor on the planet!***