Manpage Viewer
TIPS(1) FreeBSD General Commands Manual TIPS(1)

WELCOME

tipsSome tips on using linux and UNIX!
 
Welcome to `man tips`! These are tips written by tague!
 

VIM TIPS

SPLITTING THE SCREEN

When editing in vim, use ‘:vsplit’ or ‘:vsplit FILENAME’ to split the screen! You can switch betweeen split sections by typing Ctrl+W and then pressing an arrow key. If you have your mouse working in vim, you can also click to switch sections.
 

USING YOUR MOUSE

If you want to use your mouse in vim, call the command ‘set mouse=a’ . This can be done from the in-editor command area (as ‘:set mouse=a’ ), OR it can be placed in your ‘~/.vimrc’ file, a file that specifies commands to run when vim is opened.
 

INDENTATION

If you edit code in vim, you can enable automatic indentation by placing the following in your ‘~/.vimrc’ file: ‘set smartindent’ .
 

UNDOING

If you want to undo something in vim, press the ‘u’ key! To redo, type the command ‘:redo’ !
 

RUNNING COMMANDS

If you want to quickly run a command, you may do so from the command entry mode. Type ‘’: to enter the mode, followed by an exclamation mark ( ‘!’ ) and the command you want to run. For example, if you're editing a script ‘test.py’ , you can test it with ‘:!python3 test.py’ without even leaving the editor!
 

TERMINAL IN VIM

In newer versions of vim and neovim, you can open a terminal inside your editor using the ‘:terminal’ command! You may only run commands while in insert mode, so make sure to hit ‘i’ whenever switching back to it!
 
This is most useful in splitscreen! Run ‘:vsplit’ , followed by ‘:terminal’ , to split-screen a terminal with your editing area.
 
 

SCRIPT FILES

Any file that is marked as executable is a script file! You run a script file by typing its name on the command line. If it isn't stored in a location on your path (e.g. ‘/usr/bin’ ), you'll need to specify a literal path, such as ‘./script’ .
 
Script files, by default, are run with ‘sh’ . You can change this using a special line called a `shebang` at the start of your script file. This takes the form of ‘#!path’ , where ‘path’ is the path to the program to run the script with.
 
Be aware that a lot of programs aren't in a consistent location! For example, on some systems, ‘bash’ is located at ‘/bin/bash’ , but on others it's ‘/usr/bin/bash’ ! To get around this, a program called ‘env’ can be used. This program, which is rather consistently located in ‘/usr/bin/env’ , will find and execute the command you pass to it.
 
For example, if you want your script to run with ‘bash’ , begin the file with:
#!/usr/bin/env bash
 
If you want your script to run with ‘python’ , begin the file with:
#!/usr/bin/env python3
 
 
 

WEIRD STUFF

FUNNY MANPAGES

A lovely package called ‘funny-manpages’ provides a nice collection of manpages with weird and wonderful contents... For your convenience, here they are.
 
Be aware that some may be inappropriate or offensive. I didn't write them, I only installed them for your viewing, so don't blame me!
 
baby(1fun) c(1fun) celibacy(1fun) condom(1fun) date(1fun) echo(1fun) flame(1fun) flog(1fun) gong(1fun) grope(1fun) lart(1fun) party(1fun) rescrog(1fun) rm(1fun) rtfm(1fun) slave(1fun) sysadmin(1fun) think(1fun) tm(1fun) uubp(1fun) whack(1fun) xkill(1fun) xlart(1fun)
 
people(2fun)
 
chastise(3fun) strfry(3fun)
 
normality(5fun)
 
sex(6fun)
 
bosskill(8fun) ctluser(8fun) guru(8fun) knife(8fun) luser(8fun) nuke(8fun) pmsd(8fun)
 
November 12, 2019 FreeBSD 11.3-STABLE
Manpages sourced from FreeBSD, and from debian's funny-manpages package. Viewer developed by Ethan McTague.