- Scroll up: Shift + PgUp
- Scroll down: Shift + PgDown
- History:
cat /dev/vcsu - You can get a copy of the text off the machine with:
mkdir wwwcd wwwcp /dev/vcsu .ip aand take a note of the IP address.srvfiles -h 0.0.0.0 -p 80- Then on the same LAN, open
http://192.168.x.y/vcsuin a web browser.
Here are some quick instructions for installing https://github.com/fatih/vim-go
# First install the vim plugin manager:
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# Add the vim-go plugin to the vimrc:
echo "call plug#begin('~/.vim/plugged')" >> ~/.vimrc
echo "Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }" >> ~/.vimrc
echo "call plug#end()" >> ~/.vimrc
# Install the plugins:
vim +PlugInstall
See the Run-It/Build-It/Fix-It/Test-It/... sections in https://github.com/fatih/vim-go/wiki/Tutorial
You can setup shortcuts in your vimrc like this:
map <F3> :GoBuild<CR>
map <F4> :GoTest<CR>
This depends on the previous steps to setup Go for Vim.
Adding this line to your vimrc makes the experience better:
echo "let g:go_debug_log_output = 0" >> ~/.vimrc
- Start the debugger with
:GoDebugStart. - Set a breakpoint on the current line with
:GoDebugBreakpointor<F9>. - Run to the breakpoint with
:GoDebugContinueor<F5>. - You should see the following windows:
- STACKTRACE: Hit enter on any of these to jump to the code.
- VARIABLES: Local variables, arguments and registers
- GOROUTINES: Hit enter on any of these to jump to the code.
- OUTPUT: Output from the program and dlv
- Use these commands to navigate your code (see
:help GoDebugStart)::GoDebugNextor<F10>: Run to next line in the current function:GoDebugStepor<F11>: Run to next line which may be in another function (due to a function call).:GoDebugStepOut: Run until the current function returns:GoDebugSet {var} {value}: Only works for ints, bool, float and pointers.:GoDebugPrint {expr}: Print the result of the expression.<F6>: Print the value of word under the cursor.
- Stop the debugger with
:GoDebugStop.
- Use CTRL-Z to move the process to background.
- Send the ABRT signal
kill -ABRT %1 - Resume the job with
fg.