Skip to content

Commit

Permalink
tomorrows post
Browse files Browse the repository at this point in the history
  • Loading branch information
spsanderson committed Nov 22, 2024
1 parent bf948a0 commit d31a610
Show file tree
Hide file tree
Showing 9 changed files with 1,872 additions and 478 deletions.
952 changes: 476 additions & 476 deletions docs/index.html

Large diffs are not rendered by default.

1,051 changes: 1,051 additions & 0 deletions docs/posts/2024-11-22/index.html

Large diffs are not rendered by default.

Binary file added docs/posts/2024-11-22/todays_post.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/posts/2024-11-22/vim.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 77 additions & 0 deletions docs/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -13354,5 +13354,82 @@
"title": "How to Compare Two Columns in R: A Comprehensive Guide with Examples",
"section": "References",
"text": "References\n\nR Documentation: Comparison Operators\nR Documentation: identical() Function\nR Documentation: all.equal() Function\nR Documentation: match() Function\n\nWe encourage you to explore these resources for more detailed information on comparing columns in R.\nIf you found this article helpful, please share it with your fellow R programmers and let us know your thoughts in the comments section below. Your feedback is valuable to us!\n\nHappy Coding! 🚀\n\n\n\nIdentical?\n\n\n\nYou can connect with me at any one of the below:\nTelegram Channel here: https://t.me/steveondata\nLinkedIn Network here: https://www.linkedin.com/in/spsanderson/\nMastadon Social here: https://mstdn.social/@stevensanderson\nRStats Network here: https://rstats.me/@spsanderson\nGitHub Network here: https://github.com/spsanderson\nBluesky Network here: https://bsky.app/profile/spsanderson.com"
},
{
"objectID": "posts/2024-11-22/index.html",
"href": "posts/2024-11-22/index.html",
"title": "A Beginner’s Guide to VI and VIM: Mastering Text Editing in Linux",
"section": "",
"text": "Are you new to Linux and looking to learn the basics of text editing? Look no further than VI (or VIM), the ubiquitous text editor that comes pre-installed on nearly every Linux distribution. While it may seem intimidating at first with its unique modal editing style, VI is a powerful tool that is well worth learning. In this beginner-friendly guide, we’ll walk you through the fundamentals of using VI to edit text files on Linux systems."
},
{
"objectID": "posts/2024-11-22/index.html#what-is-vi",
"href": "posts/2024-11-22/index.html#what-is-vi",
"title": "A Beginner’s Guide to VI and VIM: Mastering Text Editing in Linux",
"section": "What is VI?",
"text": "What is VI?\nVI, which stands for “Visual Editor”, is a screen-oriented text editor originally created for the Unix operating system. Today, it is available on Linux, macOS, and other Unix-like systems. VI is known for its modal editing, where the meaning of typed keys depends on which mode the editor is in.\nThe original VI was developed by Bill Joy in 1976 as the visual mode for a line editor called EX. It has since been replaced by an improved version called VIM (VI Improved), which adds many useful features while maintaining backwards compatibility with the original VI."
},
{
"objectID": "posts/2024-11-22/index.html#why-learn-vi",
"href": "posts/2024-11-22/index.html#why-learn-vi",
"title": "A Beginner’s Guide to VI and VIM: Mastering Text Editing in Linux",
"section": "Why Learn VI?",
"text": "Why Learn VI?\nYou may be wondering, with modern graphical text editors and IDEs available, why bother learning an old, terminal-based editor like VI? Here are a few compelling reasons:\n\nVI is installed by default on virtually all Linux and Unix-based systems. Knowing the basics will allow you to edit text files on any system you log into.\nVI is lightweight and fast, making it ideal for quick edits without the overhead of a graphical editor.\nMany common Linux tools like less and man use VI-style key bindings, so familiarity with VI will make you more proficient on the command line overall.\nMastering VI will greatly improve your speed and efficiency when editing code and configuration files.\nVI has an extensive ecosystem of plugins and customizations that cater to specific editing needs, from syntax highlighting to version control integration."
},
{
"objectID": "posts/2024-11-22/index.html#getting-started",
"href": "posts/2024-11-22/index.html#getting-started",
"title": "A Beginner’s Guide to VI and VIM: Mastering Text Editing in Linux",
"section": "Getting Started",
"text": "Getting Started\nTo launch VI, simply open a terminal and type vi followed by the name of the file you want to edit (or create):\nvi myfile.txt\nIf the specified file does not exist, VI will create a new blank file. If no filename is given, VI will open with an empty untitled document."
},
{
"objectID": "posts/2024-11-22/index.html#modes-in-vi",
"href": "posts/2024-11-22/index.html#modes-in-vi",
"title": "A Beginner’s Guide to VI and VIM: Mastering Text Editing in Linux",
"section": "Modes in VI",
"text": "Modes in VI\nOne of the first things to understand about VI is its concept of modes. When you open a file in VI, you start in command mode, where typed keys are interpreted as commands that control the editor. To enter text, you must switch to insert mode. Let’s look at the three main modes:\n\nCommand Mode\nWhen you first open VI, you are in command mode. In this mode, every key is a command that performs a specific action, such as navigating through the document, deleting text, or changing options. For example:\n\nUse the arrow keys or h, j, k, l to move the cursor around\nx deletes the character under the cursor\ndd deletes the current line\n:w saves the file\n:q quits VI\n\n\n\nInsert Mode\nTo enter text into the document, you need to switch to insert mode. Press i to enter insert mode at the cursor position. Now any keys you type will be inserted into the document at the cursor position. To return to command mode, press Esc.\nThere are a few other ways to enter insert mode:\n\na appends text after the cursor\no inserts a new line below the current one and enters insert mode\nO inserts a new line above the current one and enters insert mode\n\n\n\nVisual Mode\nVisual mode allows you to visually select text in the document for manipulation. Press v to enter visual mode, then use the arrow keys or VI movement commands to select text. Once selected, you can perform operations on the highlighted text, such as:\n\nd to delete the selected text\ny to “yank” (copy) the selected text\n> to indent the selected lines\n\nPress Esc to exit visual mode and return to command mode."
},
{
"objectID": "posts/2024-11-22/index.html#basic-editing",
"href": "posts/2024-11-22/index.html#basic-editing",
"title": "A Beginner’s Guide to VI and VIM: Mastering Text Editing in Linux",
"section": "Basic Editing",
"text": "Basic Editing\nNow that you understand VI’s modal editing system, let’s look at some basic editing tasks.\n\nNavigation\nIn command mode, you can navigate through the document using the arrow keys or these “HJKL” keys:\n\nh moves one character left\nj moves one line down\nk moves one line up\nl moves one character right\n\nYou can precede these movements with a number to move faster:\n\n10j moves down 10 lines\n5l moves right 5 characters\n\nThere are also some bigger movement commands:\n\nw moves to the start of the next word\nb moves to the start of the previous word\n0 moves to the start of the line\n$ moves to the end of the line\ngg moves to the first line of the file\nG moves to the last line of the file\n\n\n\nEditing Text\nFrom command mode:\n\ni enters insert mode at the cursor\na enters insert mode after the cursor\nx deletes the character under the cursor\ndd deletes the current line\nyy yanks (copies) the current line\np pastes the last deleted or yanked text after the cursor\nu undoes the last change\n\n\n\nSaving and Quitting\nTo save your changes, type :w in command mode and press Enter. To quit VI, type :q and press Enter. If you have unsaved changes, VI will warn you and refuse to quit. To discard your changes and quit anyway, use :q!. To save and quit in one command, type :wq."
},
{
"objectID": "posts/2024-11-22/index.html#your-turn",
"href": "posts/2024-11-22/index.html#your-turn",
"title": "A Beginner’s Guide to VI and VIM: Mastering Text Editing in Linux",
"section": "Your Turn!",
"text": "Your Turn!\nNow that you’ve learned the basics of VI, it’s time to practice! Open a new file in VI and try out the following:\n\nEnter insert mode and type a few lines of text\nUse the movement keys to navigate around and make some edits\nYank and paste a line of text\nSave the file and quit VI\n\nHere’s a sample text you can use:\nThe quick brown fox jumps over the lazy dog.\nPack my box with five dozen liquor jugs. \nHow vexingly quick daft zebras jump!\n\n\nClick Here For Solution!\n\n\nOpen a new file in VI by typing vi test_file.txt in your terminal.\nPress i to enter insert mode and type the sample text:\n\nThe quick brown fox jumps over the lazy dog.\nPack my box with five dozen liquor jugs. \nHow vexingly quick daft zebras jump!\n\nPress Esc to return to command mode.\nUse h, j, k, l or arrow keys to move the cursor around the text. Make some edits, such as changing “jumps” to “leaps” in the first line.\nMove the cursor to the second line and press yy to yank (copy) the line.\nMove the cursor to the end of the file and press p to paste the yanked line.\nTo save the changes, type :w in command mode and press Enter.\nTo quit VI, type :q and press Enter.\n\nCongratulations, you’ve just completed your first VI editing session! With practice, these commands will become second nature, and you’ll be able to efficiently navigate and edit text files in any Unix-based environment.\n\n\n\nFrom my terminal"
},
{
"objectID": "posts/2024-11-22/index.html#quick-takeaways",
"href": "posts/2024-11-22/index.html#quick-takeaways",
"title": "A Beginner’s Guide to VI and VIM: Mastering Text Editing in Linux",
"section": "Quick Takeaways",
"text": "Quick Takeaways\n\nVI is a powerful terminal-based text editor with a modal editing system\nCommand mode is for entering commands, insert mode is for text input\nUse h, j, k, l or arrow keys to navigate in command mode\nSwitch between modes with i, Esc, v\n:w saves, :q quits, :wq saves and quits"
},
{
"objectID": "posts/2024-11-22/index.html#conclusion",
"href": "posts/2024-11-22/index.html#conclusion",
"title": "A Beginner’s Guide to VI and VIM: Mastering Text Editing in Linux",
"section": "Conclusion",
"text": "Conclusion\nCongratulations, you now know the basics of using the VI editor on Linux! While it takes some practice to master the key commands and modal editing style, the effort you put in will pay off in your future Linux endeavors. VI is an indispensable tool for system administrators, developers, and power users.\nTo further hone your skills, spend some time each day editing files in VI. You’ll be surprised how quickly the key bindings will become second nature. As you gain proficiency, you can explore VI’s more advanced features like macros, split windows, and customizing your configuration."
},
{
"objectID": "posts/2024-11-22/index.html#faqs",
"href": "posts/2024-11-22/index.html#faqs",
"title": "A Beginner’s Guide to VI and VIM: Mastering Text Editing in Linux",
"section": "FAQs",
"text": "FAQs\nQ: What is the difference between VI and VIM?\nA: VIM is an enhanced version of the original VI editor, with additional features and customization options. However, VIM maintains backwards compatibility with VI, so the core functionality is the same.\nQ: Can I use the mouse in VI?\nA: VI was designed for a mouse-free workflow, so it relies on keyboard commands for all navigation and editing tasks. However, some modern versions of VIM do include mouse support as an optional feature.\nQ: How can I customize VI to my liking?\nA: VI looks for a configuration file called .vimrc in your home directory. Here you can set your preferred options, define custom key mappings, and more. See the VIM documentation for a full list of available settings.\nQ: Is it worth learning VI if I already use a graphical editor?\nA: Absolutely! VI is a fundamental tool that every Linux user should know. Not only is it ubiquitous across all Unix-like systems, but mastering VI will also make you more efficient in terminal-based workflows. That said, there’s nothing wrong with using a graphical editor when it makes sense.\nQ: Can I use VI to edit code with syntax highlighting?\nA: Yes, VIM has excellent support for syntax highlighting for hundreds of programming languages and file formats. It also has features like code folding, auto-indentation, and plugins for specific languages and frameworks.\nI hope this gentle introduction to VI has piqued your interest and encouraged you to explore this classic Linux tool. Stick with it, and you’ll be editing like a pro in no time! Let me know if you have any other questions."
},
{
"objectID": "posts/2024-11-22/index.html#references",
"href": "posts/2024-11-22/index.html#references",
"title": "A Beginner’s Guide to VI and VIM: Mastering Text Editing in Linux",
"section": "References",
"text": "References\n\n“Classic Sysadmin: Vim 101 – A Beginner’s Guide to Vim” - The Linux Foundation Blog, https://www.linuxfoundation.org/blog/blog/classic-sysadmin-vim-101-a-beginners-guide-to-vim\n“Vi vs Vim: Choosing the First Right Text Editor” - GeeksforGeeks, https://www.geeksforgeeks.org/vi-vs-vim-choosing-the-first-right-text-editor/\n“8 Reasons to Learn Vi/Vim Editor in Linux” - Tecmint, https://www.tecmint.com/reasons-to-learn-vi-vim-editor-in-linux/\n“Learning The vi Editor” - Wikibooks, https://en.wikibooks.org/wiki/Vi\n“The Vim Book” - Steve Oualline, //ftp.vim.org/pub/vim/doc/book/vimbook-OPL.pdf\n“Bill Joy” - Wikipedia, https://en.wikipedia.org/wiki/Bill_Joy\n“Bram Moolenaar” - Wikipedia, https://en.wikipedia.org/wiki/Bram_Moolenaar\n\n\nHappy Coding! 🚀\n\n\n\nVIM\n\n\n\nYou can connect with me at any one of the below:\nTelegram Channel here: https://t.me/steveondata\nLinkedIn Network here: https://www.linkedin.com/in/spsanderson/\nMastadon Social here: https://mstdn.social/@stevensanderson\nRStats Network here: https://rstats.me/@spsanderson\nGitHub Network here: https://github.com/spsanderson\nBluesky Network here: https://bsky.app/profile/spsanderson.com"
}
]
8 changes: 6 additions & 2 deletions docs/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@
</url>
<url>
<loc>https://www.spsanderson.com/steveondata/index.html</loc>
<lastmod>2023-03-28T12:23:03.885Z</lastmod>
<lastmod>2022-11-16T15:17:41.340Z</lastmod>
</url>
<url>
<loc>https://www.spsanderson.com/steveondata/about.html</loc>
Expand Down Expand Up @@ -1910,6 +1910,10 @@
</url>
<url>
<loc>https://www.spsanderson.com/steveondata/posts/2024-11-21/index.html</loc>
<lastmod>2024-11-21T12:32:30.445Z</lastmod>
<lastmod>2024-11-22T02:35:12.706Z</lastmod>
</url>
<url>
<loc>https://www.spsanderson.com/steveondata/posts/2024-11-22/index.html</loc>
<lastmod>2024-11-22T03:00:49.227Z</lastmod>
</url>
</urlset>
Loading

0 comments on commit d31a610

Please sign in to comment.