{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Vim Text Editor\n", "\n", "## GUI-based and Terminal-based Editors\n", "\n", "The fundamental tool of every programmer is there text editor. While there many options for text editors, they generally fall into two categories: terminal-based and GUI-based.\n", "\n", "As the name implies, GUI-based text editors open up their own graphical user interface for you two write in. It is likely you have all worked with a GUI-based text editor such as Notepad, Notepad++, Visual Studio, Eclipse, MATLAB's editor, gedit, or [Sublime Text](https://www.sublimetext.com/) (my personal favorite)\n", "\n", "Terminal-based editors run directly in a command terminal and do not open up a separate window/interface. These can be a bit more tedious to work with at first. For example, you often can't use your mouse to move your cursor to different part of a file. It can even be hard to figure our how to exit a terminal-based text editor once it's started!!\n", "\n", "In spite of these initial difficulties, terminal-based text editors are very important for robotics and embedded programming. When modifying code on another \"remote\" computer or onboard your drone, you often can't open a graphical interface. This means you __must use a terminal-based editor__." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Vim Tutorial\n", "\n", "While there are many great terminal-based text editors (and __very__ strong opinions on which to use), this tutorial introduces [Vim](https://en.wikipedia.org/wiki/Vim_(text_editor)).\n", "\n", "The nice thing about Vim is that it comes with a ready-made tutorial! Simply open a terminal `Ctrl+Alt+T` and enter command:\n", "\n", "```\n", "vimtutor\n", "```\n", "\n", "...and away you go!\n", "\n", "
\n", "\n", "**Warning:** \n", "\n", "Everyone's first reaction and complaint about Vim is: \"HOW DO I EXIT OUT OF THIS THING!!!\". To exit, use the following sequence:\n", "\n", "```\n", "Esc\n", ":q\n", "```\n", "\n", "If it complains about unsaved work, either use `:wq` to save (write) or `:q!` to discard unsaved work\n", "\n", "
" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.5" } }, "nbformat": 4, "nbformat_minor": 2 }