Intro to Vimscript

This is a companion discussion topic for the original entry at

For intro to vimscript, it might be helpful to mention sourcing the file first. I had to give it a quick google. but I needed to source the file before my scripts would work. I think this isn’t needed if it’s in the vimrc, but I don’t think these are needed for that.

source the current file with :so %

You incorrectly asserted that strings evaluate to false in Ruby in this video. Only nil and false are falsey in Ruby. Everything else is truthy (including 0, empty strings, etc).

@shelmire guess he was talking about how ruby coerces a string into an integer.

> "hey".to_i
=> 0 
> "8 days a week".to_i
=> 8 

pretty similar to vimscript! :slight_smile: