This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" I ended up using this for starting the long-running qdocs server in qdocs-vim (https://github.com/johansenja/qdocs-vim). | |
" Obviously this requires ruby to spawn the process, but that is ok here given that qdocs is written in ruby anyway | |
" spawn the process and grab the pid to be able to refer to later | |
" --disable=all just speeds up the ruby start time | |
let l:long_running_pid = system("ruby --disable=all -e 'print(spawn(%{long_running_shell_command}))'") | |
" stop the server using the pid from earlier | |
exe "! kill -9 " . l:long_running_pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### Basic data types you need to know #### | |
nil | |
"String" | |
:Symbol # immutable; often used as identifiers for methods or properties, esp. as keys of hashes | |
1.is_a? Integer # true | |
1.0.is_a? Float # true | |
# Arrays: | |
my_array = [] |