{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "92976c2d-6e22-404c-85f1-d19a0ef3310a",
   "metadata": {},
   "source": [
    "#  ```nano``` editor tutorial.\n",
    "\n",
    "\n",
    "1. Opening and Creating Files:\n",
    "- To open an existing file or create a new one: [1]\n",
    "```bash\n",
    "nano filename.txt\n",
    "```\n",
    "(Replace filename.txt with your desired file name.) [1]\n",
    "- To open a file with the cursor at a specific line and column:\n",
    "```bash\n",
    "nano +line_number,column_number filename.txt\n",
    "```\n",
    "3. Basic Navigation and Editing:\n",
    "- Navigation: Use the arrow keys to move the cursor. Page ```Up/Down``` keys move a screen at a time.\n",
    "- Typing: Begin typing directly after opening the file.\n",
    "- Deleting Characters: Use the ```Backspace``` key.\n",
    "- Deleting a Line: Press ```Ctrl+K```.\n",
    "- Cutting Text: Mark text by pressing ```Alt+A``` at the start, then move with ```arrow``` keys, and press ```Ctrl+K``` to cut.\n",
    "- Copying Text: Mark text as above, then press ```Alt+6``` to copy.\n",
    "- Pasting Text: Navigate to the desired location and press ```Ctrl+U```.\n",
    "- Undo/Redo: ```Alt+U``` to undo, ```Alt+R``` to redo.\n",
    "4. Saving and Exiting:\n",
    "- Saving Changes (without exiting): Press ```Ctrl+O```. You may be prompted to confirm the filename.\n",
    "- Exiting (and saving if prompted): Press ```Ctrl+X```. If changes were made, you'll be asked to save; press ```Y``` for ```Yes``` or ```N``` for ```No```.\n",
    "5. Other Useful Features:\n",
    "- Searching: Press ```Ctrl+W```, enter your search term, and press ```Enter```. Press ```Ctrl+W``` again and Enter to find the next occurrence.\n",
    "- Replacing: Press ```Ctrl+\\``` (or ```Alt+R```), enter the search term, then the replacement term. You can choose to replace all or selectively.\n",
    "- Help: Press ```Ctrl+G``` for a full list of commands and their shortcuts.\n",
    "- \n",
    "Note: The caret symbol ```^``` indicates the ```Ctrl``` key.  For example, ```^X``` means ```Ctrl+X```.\n",
    "\n",
    "[1 How to Use Nano, the Linux Command Line Text Editor](https://linuxize.com/post/how-to-use-nano-text-editor/)\n",
    "\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "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.13.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
