5 ms·
How much of an investment is to learn vimscript? I want to write some plugins but I also don't really feel like learning it. Wish I could use different langs bu
by shriek 10y ago
How much of an investment is to learn vimscript? I want to write some plugins but I also don't really feel like learning it. Wish I could use different langs but from what I'm hearing I'd have to learn vimscript anyway.
- flukus 10y agoIf you're a programmer, not hard at all. The language is fairly simple and quite powerful these days. It has a few quirks, like variable scoping (global, local, buffer, window, tab), but these are great once you get used to them. The hard part is learning the API, which takes a lot of googling. Start off writing some helper functions for your own use and turn them into plugins later.
- Tehnix 10y agoNot that much to be honest, there are some quirks and such as variable scopings (g:, s:, l: a:) and other things, but other than that it's pretty familiar. A few great resources I found after having googled a ton around was [0] and [1]. If you are very familiar with vim (I'm not really a power user tbh), then all the commands you use with : are supported in vim script. Meaning opening a split in your script is, well, just split. [0] http://ricostacruz.com/cheatsheets/vimscript.html http://ricostacruz.com/cheatsheets/vimscript.html [1] http://www.ibm.com/developerworks/library/l-vim-script-1/ http://www.ibm.com/developerworks/library/l-vim-script-1/
- shriek 10y agoThat cheatsheet is really well done. Thanks for that.
- __s 10y agoI learnt it by writing a befunge interpreter: https://github.com/serprex/Befunge/blob/master/bef.vim https://github.com/serprex/Befunge/blob/master/bef.vim