After couple of years on vim on a daily basis, I wanted to dig on the :help command in order to customize my vim.
:help filetype :help script :help plugin
After reading a couple of help commands, I noticed that writting a plugin for vim is really easy and straightforward.
So I just dive into the code for an easy first plugin. I’m typing all the command
After that, I just type my first plugin in the file : ‘~/.vim/plugin/edit_snippets.vim’
And this is the result file :
function EditSnippets() if !exists("&filetype") echom "error, no filetype found" else echom "need to open : ~/.vim/snippets/".&filetype.".snippets" execute ":tabnew ~/.vim/snippets/".&filetype.".snippets" endif endfunction