I really hope someone on this subject can help me.
I recently enrolled for a programming course and one subject requires me to program in c/c++ on Linux os. I've had previous c++ experience on the .net framework building console apps and winforms.
The problem is this course wants us not to use any IDE of any sort, the only thing we allowed to use is the terminal and something called 'vi commands'. How can get started with?
I suggest you install vim. From the terminal Ctrl+Alt+t:
Several dependencies will also be installed. Then start a new project, again from the terminal:
Learn more about vim:
After installing
vim
runningfrom the commandline you'll get "a 30 minute tutorial that teaches the most basic Vim functionality hands-on" as it calls itself.
vi
is super frustrating if you don't know your way around it. You get a sea of little tildes and you're supposed to know what to do? Eesh.I recommend at least installing
gvim
so you have a help menu, which you can use for reference. It isn't an IDE so you aren't cheating on your class. Doapt-get install gvim
-- when you can't remember how the heck you're supposed to open a dang file or save one, you can look at the menu. The keyboard shortcuts are listed on the menus. Just make sure that you actually type out the keyboard commands, even if you have to check a menu to remember them.The really basic things that you need to know to avoid going insane:
Other resources: this looks like a great getting started tutorial: http://www.openvim.com/tutorial.html as does the WikiBooks edition of Learning the vi editor
First: install vim. Otherwise you're in for a world of pain. Second: you should try looking for something called a 'cheat sheet'. They're useful documents which contain mostly commands and a small explanation. Some examples:
Not all those commands will be useful to you, but nothing stops you from creating your own cheat sheet
If you want to become a
vim
ninja in a fun way, try this: http://vim-adventures.com/. You learn all the basicvim
functionality by playing a fun little game.And as an extra: if you prefer moving around with the arrow keys instead of the letters and you want backspace to behave as in nano (at least I do), you can add the following in your ~/.vimrc file (if you do not have one, just create it):
I install vim without sudo, in docker container,