<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Nisal Sashmitha</title>
    <description>The latest articles on Forem by Nisal Sashmitha (@nisal_sashmitha).</description>
    <link>https://forem.com/nisal_sashmitha</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2249252%2F40e1d16c-e1c4-435b-ad5a-7ffedd2c8138.png</url>
      <title>Forem: Nisal Sashmitha</title>
      <link>https://forem.com/nisal_sashmitha</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nisal_sashmitha"/>
    <language>en</language>
    <item>
      <title>Vim Essential Shortcuts (Linux VI Editor — part 3)</title>
      <dc:creator>Nisal Sashmitha</dc:creator>
      <pubDate>Mon, 04 Aug 2025 09:51:16 +0000</pubDate>
      <link>https://forem.com/nisal_sashmitha/vim-essential-shortcuts-linux-vi-editor-part-3-nan</link>
      <guid>https://forem.com/nisal_sashmitha/vim-essential-shortcuts-linux-vi-editor-part-3-nan</guid>
      <description>&lt;h3&gt;
  
  
  &lt;strong&gt;Vim Essential Shortcuts (Linux VI Editor&lt;/strong&gt; — part 3)
&lt;/h3&gt;

&lt;p&gt;So far we’ve learned about vim editor’s basics, modes, and how to exit and save files. You now know how to create a file, add basic text, manipulate it a bit, and save your work.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk8yizq6oy61kmu9gpb23.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk8yizq6oy61kmu9gpb23.png" width="800" height="349"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now it’s time to supercharge your vim skills! Learning vim shortcuts will make you significantly more efficient. We’ll cover navigation shortcuts, deletion, cutting (yanking), pasting (putting), and text transformation. These commands will transform how you work with text.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📝Quick Note:&lt;/strong&gt; There are many more powerful shortcuts available than what’s covered in this document. Think of this as your foundation — a way to understand what’s possible with vim and inspire further exploration. I’ve included a comprehensive cheat sheet at the end for your reference.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;💡Pro Tip:&lt;/strong&gt; Once you master these basics, you can unlock even more power by learning &lt;strong&gt;operators&lt;/strong&gt; , &lt;strong&gt;text objects&lt;/strong&gt; , and &lt;strong&gt;macros&lt;/strong&gt;  — which we’ll cover in future articles. These concepts will help you combine commands in powerful ways!&lt;/p&gt;

&lt;h3&gt;
  
  
  Navigation: Moving Around Like a Pro
&lt;/h3&gt;

&lt;p&gt;Remember, These navigation commands work in &lt;strong&gt;Normal mode&lt;/strong&gt; (press Esc to get there). One of vim's greatest strengths is that you can navigate without moving your hands from our normal typing position.&lt;/p&gt;

&lt;h3&gt;
  
  
  Basic Movement (The Foundation)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;h - move left (think: h is on the left)
j - move down (think: j points down)
k - move up (think: k points up) 
l - move right (think: l is on the right)

Navigation Map:
    k (up)
    ↑
h ← • → l
    ↓
  j (down)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Memory trick:&lt;/strong&gt; The &lt;code&gt;hjkl&lt;/code&gt; keys are arranged on your keyboard from left to right, just like the directions they represent!&lt;/p&gt;

&lt;h3&gt;
  
  
  Line Navigation
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0 - jump to start of line (beginning of line = 0)
^ - jump to first non-whitespace character
$ - jump to end of line (think: $ is at the end in shell prompts)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Word Movement
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;w - jump forwards to start of next word
W - jump forwards to start of next WORD (ignores punctuation)
b - move backward word by word (think: b = back)
e - move forward to end of current word (think: e = end)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; If your cursor is on the ‘H’ in “Hello, world! How are you?”:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;w moves to the comma ,&lt;/li&gt;
&lt;li&gt;W moves to world!&lt;/li&gt;
&lt;li&gt;e moves to the 'o' in "Hello"&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Page and Document Navigation
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Ctrl + f - page down (think: f = forward)
Ctrl + b - page up (think: b = back)
gg - go to first line of document 
G - go to last line of document
{number}gg or {number}G - go to specific line
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; To go to line 25, type: 25gg or 25G&lt;/p&gt;

&lt;h3&gt;
  
  
  Deletion: Removing Text Efficiently
&lt;/h3&gt;

&lt;p&gt;In &lt;strong&gt;Insert mode&lt;/strong&gt; , you use Delete and Backspace as normal. But &lt;strong&gt;Normal mode&lt;/strong&gt; offers much more powerful deletion options.&lt;/p&gt;

&lt;h3&gt;
  
  
  Basic Deletion
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;x - delete character under cursor (think: x marks the spot to delete)
X - delete character before cursor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Advanced Deletion (The Real Power)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dd - delete entire line
dw - delete from cursor to start of next word
d$ - delete from cursor to end of line
d0 - delete from cursor to beginning of line
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;A way to easily remember:&lt;/strong&gt; Notice the pattern? d (delete) + movement command!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;d + w = delete word&lt;/li&gt;
&lt;li&gt;d + $ = delete to end of line&lt;/li&gt;
&lt;li&gt;d + d = delete whole line&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Practical Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Original: "The quick brown fox jumps over the lazy dog"
Cursor on 'b' in "brown"

dw → "The quick fox jumps over the lazy dog"
d$ → "The quick "
dd → (entire line deleted)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Cut (Yanking) and Paste (Putting): Moving Text Around
&lt;/h3&gt;

&lt;p&gt;Vim calls copying “yanking” and pasting “putting” — think of it as yanking text out and putting it somewhere else.&lt;/p&gt;

&lt;h3&gt;
  
  
  Yanking (Copying)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yy - yank (copy) entire line
yw - yank word from cursor position
y$ - yank from cursor to end of line
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Putting (Pasting)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;p - put (paste) after cursor or below current line depending on what you copied or the place you in.
P - put (paste) before cursor or above current line
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Practical Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Original text:
Line 1: "Hello World"
Line 2: "Goodbye World"

1. Position cursor on Line 1
2. Type: yy (yanks the line)
3. Move to Line 2
4. Type: p (puts the copied line below)

Result:
Line 1: "Hello World"
Line 2: "Goodbye World" 
Line 3: "Hello World"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Pro Pattern:&lt;/strong&gt; Notice that yank commands follow the same pattern as delete:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;y + movement = yank that text&lt;/li&gt;
&lt;li&gt;d + movement = delete that text&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Text Transformation: Changing and Substituting
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Case Changes
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~ - toggle case of character under cursor
guu - make entire line lowercase
gUU - make entire line UPPERCASE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Search and Replace
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;:s/old/new/ - replace first occurrence of 'old' with 'new' on current line
:s/old/new/g - replace all occurrences of 'old' with 'new' on current line
:%s/old/new/g - replace all occurrences in entire file
:%s/old/new/gc - replace all with confirmation prompts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Practical Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Original: "This cat in the hat sat on the mat"

:%s/the/a/g

Result: "This cat in a hat sat on a mog"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffzsrw7nb4zrdfidyt3hq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffzsrw7nb4zrdfidyt3hq.png" width="800" height="213"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick Changes
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;r{char} - replace single character under cursor with {char}
cw - change word (deletes word and enters insert mode)
cc - change entire line
c$ - change from cursor to end of line
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Original: "Hello World"
Cursor on 'W' in "World"

r + M → "Hello Morld"
cw + "Universe" → "Hello Universe"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Quick Short Note
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Movement Cheat Sheet:
┌─────────────────────────────────────┐
│ Navigation │ Text Objects │
├─────────────────┼───────────────────┤
│ h j k l │ w = word │
│ 0 ^ $ │ $ = line end │
│ gg G │ 0 = line start │
│ Ctrl+f Ctrl+b │ gg G = document │
└─────────────────┴───────────────────┘

Action Commands Pattern:
[action][count][motion]
Examples:
d2w = delete 2 words
y3j = yank 3 lines down  
c$ = change to end of line
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Summary and Pro Tips
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Key Patterns to Remember:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Action + Movement = Power&lt;/strong&gt; : Most vim commands combine an action (d, y, c) with a movement (w, $, j)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Double letters often mean “whole line”&lt;/strong&gt; : dd, yy, cc&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Uppercase usually means “stronger version”&lt;/strong&gt; : W vs w, P vs p&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Practice Tips:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start with hjkl navigation - avoid arrow keys to build muscle memory&lt;/li&gt;
&lt;li&gt;Practice the d + movement pattern with different combinations&lt;/li&gt;
&lt;li&gt;Use :help [command] in vim to learn more about any command&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Next Steps:&lt;/strong&gt; Once these commands become second nature, you’ll be ready to learn about &lt;strong&gt;operators&lt;/strong&gt; , &lt;strong&gt;text objects&lt;/strong&gt; , and &lt;strong&gt;macros&lt;/strong&gt;  — which will multiply your efficiency even further!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Remember&lt;/strong&gt; : vim has a learning curve, but every shortcut you master saves you countless keystrokes in the future. Start with a few commands, use them daily, then gradually add more to your toolkit. &lt;a href="https://vim.rtorr.com/" rel="noopener noreferrer"&gt;Here&lt;/a&gt; is a good cheat sheet I found.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;✈️ &lt;em&gt;This is a article I wrote as a contribution to a open-source&lt;/em&gt;&lt;/strong&gt; &lt;a href="https://github.com/CoDeKu-Labs/devops-engineer-learning-path/tree/main/Week%201%20-%20Linux%20Fundamentals/Linux%20VI%20Editor" rel="noopener noreferrer"&gt;&lt;strong&gt;&lt;em&gt;DevOps Roadmap repository&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;&lt;em&gt;. While it focuses on the Vi editor, the repo includes many other valuable resources to support your DevOps journey — be sure to check them out too!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>linux</category>
      <category>vieditor</category>
      <category>vimeditor</category>
    </item>
    <item>
      <title>YAML: A Beginner’s Introduction</title>
      <dc:creator>Nisal Sashmitha</dc:creator>
      <pubDate>Sat, 02 Aug 2025 06:17:37 +0000</pubDate>
      <link>https://forem.com/nisal_sashmitha/yaml-a-beginners-introduction-42k0</link>
      <guid>https://forem.com/nisal_sashmitha/yaml-a-beginners-introduction-42k0</guid>
      <description>&lt;p&gt;YAML (Yet Another Markup Language or YAML Ain’t Markup Language) is a human-readable data serialization standard that’s commonly used for configuration files, data exchange, and storing structured data. It’s designed to be easy to read and write, making it popular for DevOps, applications configuration, and data representation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxr3jzpfeodc90zjerazl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxr3jzpfeodc90zjerazl.png" width="800" height="349"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why YAML? Comparing Data Formats
&lt;/h3&gt;

&lt;p&gt;Let’s see how the same data looks in different formats:&lt;/p&gt;

&lt;h4&gt;
  
  
  XML Format
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;person&amp;gt;
    &amp;lt;name&amp;gt;John Doe&amp;lt;/name&amp;gt;
    &amp;lt;age&amp;gt;30&amp;lt;/age&amp;gt;
    &amp;lt;languages&amp;gt;
        &amp;lt;language&amp;gt;Python&amp;lt;/language&amp;gt;
        &amp;lt;language&amp;gt;JavaScript&amp;lt;/language&amp;gt;
    &amp;lt;/languages&amp;gt;
&amp;lt;/person&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  JSON Format
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "person": {
    "name": "John Doe",
    "age": 30,
    "languages": ["Python", "JavaScript"]
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  YAML Format
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;person:
  name: John Doe
  age: 30
  languages:
    - Python
    - JavaScript
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, YAML is much cleaner and easier to read! No brackets, braces, or closing tags needed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key-Value Pairs in YAML
&lt;/h3&gt;

&lt;p&gt;The foundation of YAML is the key-value pair, separated by a colon and space:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Basic key-value pairs
name: John Doe
age: 30
city: New York
is_student: false
height: 5.8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; Always use a space after the colon!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# ✅ Correct
name: John

# ❌ Wrong
name:John
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Arrays/Lists in YAML
&lt;/h3&gt;

&lt;p&gt;Arrays (or lists) are represented using dashes (-). Each dash indicates an element of the array:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Simple list
fruits:
  - apple
  - banana
  - orange

# Alternative inline format
colors: [red, green, blue]

# List of numbers
scores:
  - 95
  - 87
  - 92
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Dictionaries/Maps in YAML
&lt;/h3&gt;

&lt;p&gt;Dictionaries (or maps) are collections of key-value pairs. &lt;strong&gt;Indentation is crucial&lt;/strong&gt;  — all properties of a single item must have the same number of spaces:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Dictionary example
person:
  name: Alice
  age: 25
  address:
    street: 123 Main St
    city: Boston
    zip: 02101
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Visualization of the Dictionary
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;person:
├─ name: Alice
├─ age: 25
└─ address:
   ├─ street: 123 Main St
   ├─ city: Boston
   └─ zip: 02101
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The Power and Danger of Indentation
&lt;/h3&gt;

&lt;p&gt;In YAML, &lt;strong&gt;spaces matter&lt;/strong&gt;! Different indentation levels create different meanings:&lt;/p&gt;

&lt;h4&gt;
  
  
  Correct Indentation
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# All properties at same level (2 spaces)
person:
  name: John
  age: 30
  job: Developer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Incorrect Indentation
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Mixed indentation - This will cause errors!
person:
  name: John
   age: 30 # 3 spaces - WRONG!
  job: Developer # 2 spaces - Different from age
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Nested Structure Example
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;company:
  name: Tech Corp
  employees:
    - name: Alice
      role: Developer
      skills:
        - Python
        - Docker
    - name: Bob
      role: Designer
      skills:
        - Photoshop
        - Figma
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: In above example you can see that under employees there is a array of dictionaries. ”-” indicates a start of the item.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dictionary vs List vs List of Dictionaries
&lt;/h3&gt;

&lt;p&gt;Let’s understand the differences with examples:&lt;/p&gt;

&lt;h4&gt;
  
  
  Simple Dictionary
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# A single person
person:
  name: John
  age: 30
  city: NYC
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Simple List
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# List of names
names:
  - John
  - Alice
  - Bob
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  List of Dictionaries
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Multiple people (list of dictionaries)
people:
  - name: John
    age: 30
    city: NYC
  - name: Alice
    age: 25
    city: Boston
  - name: Bob
    age: 35
    city: Seattle
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Order Matters in Lists, Not in Dictionaries
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Dictionaries: Order Doesn’t Matter
&lt;/h4&gt;

&lt;p&gt;These two dictionaries are &lt;strong&gt;identical&lt;/strong&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Dictionary 1
person:
  name: John
  age: 30
  city: NYC

# Dictionary 2 - Same as above!
person:
  city: NYC
  name: John
  age: 30
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Lists: Order Matters
&lt;/h4&gt;

&lt;p&gt;These two lists are &lt;strong&gt;different&lt;/strong&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# List 1
fruits:
  - apple
  - banana
  - orange

# List 2 - Different from above!
fruits:
  - banana
  - apple
  - orange
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Comments in YAML
&lt;/h3&gt;

&lt;p&gt;Any line starting with # is a comment and is ignored:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# This is a comment
name: John Doe # This is also a comment

# Configuration for database
database:
  host: localhost # Local development
  port: 5432
  # password: secret # Commented out for security
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Complete Example: Putting It All Together
&lt;/h3&gt;

&lt;p&gt;Here’s a comprehensive YAML example combining all concepts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Application Configuration File
app_name: "My Awesome App"
version: 2.1.0
debug: true

# Database configuration
database:
  host: localhost
  port: 5432
  name: myapp_db
  credentials:
    username: admin
    password: secret123
# List of supported languages
languages:
  - English
  - Spanish
  - French
# List of server configurations
servers:
  - name: web-server-1
    ip: 192.168.1.10
    roles:
      - web
      - api
    specs:
      cpu: 4
      memory: 8GB
  - name: db-server-1
    ip: 192.168.1.20
    roles:
      - database
    specs:
      cpu: 8
      memory: 16GB
# Feature flags
features:
  user_registration: true
  email_notifications: false
  premium_features: true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Key Takeaways and Tips
&lt;/h3&gt;

&lt;h4&gt;
  
  
  ✅ Best Practices
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Always use spaces, never tabs&lt;/strong&gt; for indentation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Be consistent&lt;/strong&gt; with indentation (usually 2 or 4 spaces)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use quotes&lt;/strong&gt; for strings that might be ambiguous&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add comments&lt;/strong&gt; to explain complex configurations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validate your YAML&lt;/strong&gt; before using it in production&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  ⚠️ Common Pitfalls
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Mixing tabs and spaces&lt;/li&gt;
&lt;li&gt;Inconsistent indentation levels&lt;/li&gt;
&lt;li&gt;Forgetting the space after colons&lt;/li&gt;
&lt;li&gt;Not quoting strings that start with numbers or special characters&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;YAML’s simplicity and readability make it an excellent choice for configuration files and data serialization. Remember: &lt;strong&gt;indentation is everything&lt;/strong&gt; in YAML, and when in doubt, validate your syntax!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Happy YAML writing! 🚀&lt;/em&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>yaml</category>
    </item>
    <item>
      <title>Docker Engine Architecture</title>
      <dc:creator>Nisal Sashmitha</dc:creator>
      <pubDate>Fri, 01 Aug 2025 07:17:29 +0000</pubDate>
      <link>https://forem.com/nisal_sashmitha/docker-engine-architecture-ebp</link>
      <guid>https://forem.com/nisal_sashmitha/docker-engine-architecture-ebp</guid>
      <description>&lt;p&gt;Have you ever wondered what happens behind the scenes when you run docker run hello-world? Let's dive into the inner workings of Docker and understand how it manages to isolate applications so effectively.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffx4gl3i5omdsmsidy3cm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffx4gl3i5omdsmsidy3cm.png" width="800" height="349"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Three Pillars of Docker Engine
&lt;/h3&gt;

&lt;p&gt;When you install Docker on a Linux system, you’re actually installing three distinct components that work together seamlessly:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq1p948kpmrvv7ijsfavu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq1p948kpmrvv7ijsfavu.png" width="730" height="131"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Docker CLI (Command Line Interface)
&lt;/h3&gt;

&lt;p&gt;This is what you interact with directly. The docker command you type in your terminal. Think of it as the remote control for your TV; it's just the interface, not the actual TV.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# These are all Docker CLI commands
docker run nginx
docker ps
docker stop container_name
docker build -t myapp .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Docker REST API
&lt;/h3&gt;

&lt;p&gt;This is the communication bridge between the Docker client and the Docker daemon. Every command you type gets translated into HTTP requests that the daemon can understand. It’s like a translator that converts your English commands into a language the daemon speaks.&lt;/p&gt;

&lt;p&gt;This API can be accessed directly using HTTP clients like curl or wget, or through HTTP libraries available in most programming languages.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Docker Daemon (dockerd)
&lt;/h3&gt;

&lt;p&gt;This is the heavy lifter, a background process that does all the actual work. It manages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Images&lt;/strong&gt; : The blueprints for containers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Containers&lt;/strong&gt; : Running instances of images&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Volumes&lt;/strong&gt; : Persistent data storage&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Networks&lt;/strong&gt; : Communication between containers&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Core Challenge: Application Isolation
&lt;/h3&gt;

&lt;p&gt;Before we dive into how Docker works, let’s understand the fundamental problem it solves. When you run multiple applications on a single machine, they all share the same operating system resources. This creates several critical issues:&lt;/p&gt;

&lt;h3&gt;
  
  
  The Problems with Traditional Application Deployment
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Resource Conflicts&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Two web servers trying to use port 80
nginx starts on port 80 ✓
apache tries to start on port 80 ✗ (Port already in use!)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Dependency Hell&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# App A needs Python 3.8, App B needs Python 3.9
App A: "I need libssl version 1.1"
App B: "I need libssl version 1.0" 
System: "I can only have one version installed!"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Process ID Collisions&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# What if two applications create processes with the same ID?
App A creates process with PID 1000
App B tries to create process with PID 1000 → CONFLICT!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Security Concerns&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Applications can see and potentially interfere with each other
ps aux # Shows ALL processes from ALL applications
kill 1000 # Can accidentally kill other app's process
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Why This Matters for Docker
&lt;/h3&gt;

&lt;p&gt;Docker’s promise is: &lt;em&gt;“Package an application with all its dependencies and run it anywhere, isolated from other applications.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;But how can you achieve this isolation when all applications are running on the same Linux kernel? You can’t install multiple operating systems for each application — that would be too resource-intensive.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Solution: Linux Namespaces and C groups
&lt;/h3&gt;

&lt;h3&gt;
  
  
  How Applications Get Containerized
&lt;/h3&gt;

&lt;p&gt;Now comes the fascinating part, how does Docker isolate applications so effectively? The secret lies in &lt;strong&gt;Namespaces.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Docker uses a concept called namespaces to handle this isolation.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Problem: Process ID Conflicts
&lt;/h3&gt;

&lt;p&gt;Imagine you’re running two applications on your system, and both try to create a process with ID 1000. Without isolation, this would cause a conflict:&lt;/p&gt;

&lt;p&gt;Without Namespaces:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3gil1gw1sjvz9vu4ube6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3gil1gw1sjvz9vu4ube6.png" width="644" height="309"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Solution: Namespaces
&lt;/h3&gt;

&lt;p&gt;Docker uses namespaces to create isolated workspaces for each container. Even though you tried to create two processes with same id you gets a your container specific process Id and the host system specific process Id. Now you can have as many as containers without conflicting.&lt;/p&gt;

&lt;p&gt;With Namespaces:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgcjhp9vy6r3j9bd4vz1l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgcjhp9vy6r3j9bd4vz1l.png" width="686" height="309"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Seeing Namespaces in Action
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Run a container and check its process ID from inside
docker run -it ubuntu bash
# Inside the container:
echo $$ # This will show PID 1 (the bash process)
ps aux # You'll see a minimal process list

# From another terminal on the host:
docker ps # Find your container ID
docker exec &amp;lt;container_id&amp;gt; ps aux # Same minimal process list
ps aux | grep bash # You'll see the actual PID on the host (much higher number)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Visual explanation&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Host System View:
PID 1 → systemd
PID 2 → kthreadd
...
PID 15847 → docker-containerd-shim
PID 15864 → bash (your container process)

Container View:
PID 1 → bash (appears as the main process)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The Complete Picture: Namespaces + Cgroups
&lt;/h3&gt;

&lt;p&gt;Now, here’s an important point: &lt;strong&gt;Namespaces alone don’t provide complete isolation!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Namespaces solve the “visibility” problem — they create separate views of system resources. But what about resource usage? What stops one container from consuming all the CPU or memory and starving other containers?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# This is still a problem with namespaces alone:
Container A: "I need all 16GB of RAM!"
Container B: "Hey, leave some RAM for me!"
System: "First come, first served!"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Docker uses TWO technologies together:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Namespaces&lt;/strong&gt; → Provide &lt;strong&gt;isolation&lt;/strong&gt; (separate views)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cgroups&lt;/strong&gt; → Provide &lt;strong&gt;resource control&lt;/strong&gt; (limits and quotas)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyax849t5edtf6ia6d7h7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyax849t5edtf6ia6d7h7.png" width="751" height="606"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Complete Docker Isolation&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  💡 Key Takeaway
&lt;/h3&gt;

&lt;p&gt;The Docker CLI, REST API, and daemon orchestrate both namespaces and cgroups to create secure, isolated, and resource-controlled containers. Each container gets its own view of processes, network, filesystem, AND guaranteed resource limits.&lt;/p&gt;

&lt;p&gt;Docker’s complete isolation magic comes from &lt;strong&gt;two Linux technologies working together&lt;/strong&gt; :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Namespaces&lt;/strong&gt; create isolated views — each container thinks it’s running alone&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cgroups&lt;/strong&gt; control resource usage — preventing containers from monopolizing system resources&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>docker</category>
      <category>dockerengine</category>
      <category>dockerarchitecture</category>
    </item>
    <item>
      <title>Introduction to VI Editor (Linux VI Editor — part 1)</title>
      <dc:creator>Nisal Sashmitha</dc:creator>
      <pubDate>Mon, 28 Jul 2025 10:23:27 +0000</pubDate>
      <link>https://forem.com/nisal_sashmitha/introduction-to-vi-editor-linux-vi-editor-part-1-37gc</link>
      <guid>https://forem.com/nisal_sashmitha/introduction-to-vi-editor-linux-vi-editor-part-1-37gc</guid>
      <description>&lt;p&gt;📖 Quick Note: This introduction gives you a high-level overview of VIM to spark your interest. Don’t worry about memorizing and understanding everything here — we’ll learn step by step in the following sections. Feel free to scan through this as a starting point and then dive into the detailed guides!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftu8bidskrk7eacq5x24g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftu8bidskrk7eacq5x24g.png" width="800" height="349"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why VI Over Simple Text Commands?
&lt;/h3&gt;

&lt;p&gt;While the cat command is handy for viewing small files, it falls short when you need to actually edit text:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# cat is great for viewing...
cat myfile.txt

# But what if you need to edit, search, or manipulate text?
# This is where VI shines!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;VI (pronounced “vee-eye”) is a powerful console-based text editor that comes pre-installed on virtually every Linux distribution. It’s your reliable companion whether you’re editing configuration files, writing code, or managing text on remote servers.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is VI Really?
&lt;/h3&gt;

&lt;p&gt;VI is short for “visual” — it was revolutionary when introduced because it allowed full-screen editing, unlike earlier line-based editors.&lt;/p&gt;

&lt;p&gt;Here’s an important fact: VI has been replaced by VIM (Vi IMproved). Many Linux distributions (like Ubuntu) use Vim to provide the vi command, meaning when you type vi in the terminal, you are actually running a version of Vim configured to behave like the original Vi, or a more feature-rich version with specific settings.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Choose VI/VIM Over Other Editors?
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Better Than Nano
&lt;/h4&gt;

&lt;p&gt;While nano is simpler for beginners, VI/VIM offers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More powerful editing capabilities&lt;/li&gt;
&lt;li&gt;Better for large files&lt;/li&gt;
&lt;li&gt;Extensive customization options&lt;/li&gt;
&lt;li&gt;Available on every Unix-like system&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  VIM is Like a Language
&lt;/h4&gt;

&lt;p&gt;VIM uses a unique approach with verbs, nouns (objects), and adjectives:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Verb + Object = Action
d + w = delete word
c + w = change word  
y + w = yank (copy) word

# Add numbers (adjectives) for even more power:
d + 3w = delete 3 words
c + 2w = change 2 words
y + 5w = yank 5 words
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes it incredibly efficient once you learn the “vocabulary.”&lt;/p&gt;

&lt;h3&gt;
  
  
  Basic Example Commands
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Start editing a file
vi myfile.txt

# Basic navigation (in normal mode)
h # Move left
j # Move down  
k # Move up
l # Move right

# Essential commands
i # Enter insert mode
Esc # Return to normal mode
:w # Save file
:q # Quit
:wq # Save and quit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  VIM’s Built-in Help System
&lt;/h3&gt;

&lt;p&gt;One of VIM’s best features is its comprehensive help system:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Access help (from within VIM)
:help # General help
:help w # Help for 'w' command
:help :w # Help for ':w' command
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can even split your screen to view help while editing your file — no need to leave the editor!&lt;/p&gt;

&lt;h3&gt;
  
  
  VIM Modes
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwripo6u5pe41tv734m8t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwripo6u5pe41tv734m8t.png" width="497" height="323"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Mode Usage Summary:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Normal Mode: Navigate, delete, copy, search, and execute commands&lt;/li&gt;
&lt;li&gt;Insert Mode: Actually type and add text to your file&lt;/li&gt;
&lt;li&gt;Visual Mode: Select text for copying, deleting, or formatting&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Joy of Efficiency
&lt;/h3&gt;

&lt;p&gt;VIM encourages creative problem-solving. There are usually multiple ways to accomplish the same task:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Delete a word - multiple methods:
dw # Delete word (cursor to end)
cw # Change word (delete and enter insert mode)
x # Delete single character (repeat as needed)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can even make it a game: “How can I accomplish this edit with the fewest keystrokes?” This mindset naturally leads to becoming more efficient over time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Summary &amp;amp; Tips
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;VI = VIM in most modern systems&lt;/li&gt;
&lt;li&gt;Three main modes: Normal (command), Insert (typing), Visual (selection)&lt;/li&gt;
&lt;li&gt;Think in terms of verbs and objects for powerful combinations&lt;/li&gt;
&lt;li&gt;Use :help extensively - it's your best learning resource&lt;/li&gt;
&lt;li&gt;Practice regularly — muscle memory is key to VIM mastery&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💡 Pro Tip: Don’t try to learn everything at once. Start with basic navigation and insertion, then gradually add new commands to your toolkit.&lt;/p&gt;

&lt;p&gt;Next: Continue your VI/VIM journey with VIM Modes section and other resources for hands-on learning and practical techniques!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;✈️ &lt;em&gt;This is a article I wrote as a contribution to a open-source&lt;/em&gt;&lt;/strong&gt; &lt;a href="https://github.com/CoDeKu-Labs/devops-engineer-learning-path/blob/main/Week%201%20-%20Linux%20Fundamentals/Linux%20VI%20Editor/Intro%20to%20VI%20Editor.md" rel="noopener noreferrer"&gt;&lt;strong&gt;&lt;em&gt;DevOps Roadmap repository&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;&lt;em&gt;. While it focuses on the Vi editor, the repo includes many other valuable resources to support your DevOps journey — be sure to check them out too!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>VIM Modes: The Heart of VIM (Linux VI Editor — part 2)</title>
      <dc:creator>Nisal Sashmitha</dc:creator>
      <pubDate>Mon, 28 Jul 2025 08:22:44 +0000</pubDate>
      <link>https://forem.com/nisal_sashmitha/vim-modes-the-heart-of-vim-linux-vi-editor-part-1-35kp</link>
      <guid>https://forem.com/nisal_sashmitha/vim-modes-the-heart-of-vim-linux-vi-editor-part-1-35kp</guid>
      <description>&lt;h3&gt;
  
  
  VIM Modes: The Heart of VIM (Linux VI Editor — part 2)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbd087tdndscya2nwlyrk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbd087tdndscya2nwlyrk.png" width="800" height="349"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📖 Overview Note: This is an overview of VIM modes. You’ll learn these concepts in more depth as we explore other VIM features. Being aware of modes and understanding what they do will really help you quickly learn other features of the VI editor. You’ll need to work between these modes to practice all upcoming tasks!&lt;/p&gt;

&lt;h3&gt;
  
  
  What Makes VIM Different?
&lt;/h3&gt;

&lt;p&gt;One of the key features that makes VIM different from other editors is its concept of modes. While most editors have just one mode where you type and use menus, VIM has distinct modes for different tasks.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Three Main Modes
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. Normal Mode (Command Mode)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Default mode when you start VIM&lt;/li&gt;
&lt;li&gt;Anything you type in Normal mode is a command&lt;/li&gt;
&lt;li&gt;Used for navigation, deletion, copying, and other file operations&lt;/li&gt;
&lt;li&gt;VIM is case sensitive — d and D do different things!&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  2. Insert Mode
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Used for actually typing and adding text to your file&lt;/li&gt;
&lt;li&gt;To enter Insert mode: Press i (or other insert commands)&lt;/li&gt;
&lt;li&gt;To exit Insert mode: Press Escape&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  3. Line Mode (Command Line Mode)
&lt;/h4&gt;

&lt;p&gt;Line mode is also called Last Line Mode or Command Line Mode. You use line mode to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Save files (:w)&lt;/li&gt;
&lt;li&gt;Quit VIM (:q)&lt;/li&gt;
&lt;li&gt;Go to exact locations in the file (:10 goes to line 10)&lt;/li&gt;
&lt;li&gt;Search and replace text&lt;/li&gt;
&lt;li&gt;Execute advanced commands&lt;/li&gt;
&lt;li&gt;Set VIM options and preferences&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Your First VIM Session
&lt;/h3&gt;

&lt;p&gt;Let’s create a file and practice moving between modes:&lt;/p&gt;

&lt;p&gt;Create and open a new file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vim myfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once VIM opens, you’ll be in Normal mode. Here’s how to move between modes:&lt;/p&gt;

&lt;h4&gt;
  
  
  You start in NORMAL MODE
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F67pa1nutuqdhq73frrdj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F67pa1nutuqdhq73frrdj.png" width="698" height="298"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Press ‘i’ to enter INSERT MODE
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwac8od5bx3k6k242qcnk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwac8od5bx3k6k242qcnk.png" width="684" height="296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Now type some text
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Femvcuznznwypl6ejjlxu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Femvcuznznwypl6ejjlxu.png" width="683" height="291"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Press Escape to return to NORMAL MODE
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwu86hm9otruwvzxi8x02.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwu86hm9otruwvzxi8x02.png" width="688" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Press : to enter command mode, then type w to save or wq to save and quit. If you type w, you’ll return to normal mode after saving.
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flix7gnc3oqrppytgjw98.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flix7gnc3oqrppytgjw98.png" width="691" height="291"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Mode flow
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffyre2cknu2itsmdxa4in.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffyre2cknu2itsmdxa4in.png" width="650" height="516"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Visual Mode (Bonus)
&lt;/h3&gt;

&lt;p&gt;There’s also Visual Mode for selecting text:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To enter: Press v in Normal mode&lt;/li&gt;
&lt;li&gt;Purpose: Select text for copying, deleting, or formatting&lt;/li&gt;
&lt;li&gt;To exit: Press Escape&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Complete Mode Switching Examples
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Starting in Normal mode
i # Enter Insert mode
&amp;lt;Esc&amp;gt; # Back to Normal mode
: # Enter Line mode
&amp;lt;Esc&amp;gt; # Back to Normal mode (abandon command)
:w # Enter Line mode and save
&amp;lt;Enter&amp;gt; # Execute command, return to Normal mode
v # Enter Visual mode
&amp;lt;Esc&amp;gt; # Back to Normal mode
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Other Modes Exist Too!
&lt;/h3&gt;

&lt;p&gt;VIM has additional modes like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Replace mode&lt;/li&gt;
&lt;li&gt;Binary mode&lt;/li&gt;
&lt;li&gt;Org mode&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are slight variations of the main modes and you’ll learn about them later as you become more comfortable with VIM.&lt;/p&gt;

&lt;h3&gt;
  
  
  Summary &amp;amp; Tips
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Three main modes: Normal (commands), Insert (typing), Line (file operations)&lt;/li&gt;
&lt;li&gt;Always start in Normal mode when opening VIM&lt;/li&gt;
&lt;li&gt;Escape is your friend — it always returns you to Normal mode&lt;/li&gt;
&lt;li&gt;Case sensitivity matters — i and I are different commands&lt;/li&gt;
&lt;li&gt;Line mode starts with : - used for file operations and advanced commands&lt;/li&gt;
&lt;li&gt;Practice mode switching — it becomes second nature quickly&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;💡 Pro Tip: When in doubt, press&lt;/em&gt; &lt;em&gt;Escape twice to ensure you're in Normal mode, then proceed with your desired command. This is a safe way to "reset" your mode state!&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Next&lt;/strong&gt; : Master VIM navigation and movement commands to efficiently move around your files!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;✈️ &lt;em&gt;This is a article I wrote as a contribution to a open-source&lt;/em&gt;&lt;/strong&gt; &lt;a href="https://github.com/CoDeKu-Labs/devops-engineer-learning-path/blob/main/Week%201%20-%20Linux%20Fundamentals/Linux%20VI%20Editor/VIM%20Modes.md" rel="noopener noreferrer"&gt;&lt;strong&gt;&lt;em&gt;DevOps Roadmap repository&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;&lt;em&gt;. While it focuses on the Vi editor, the repo includes many other valuable resources to support your DevOps journey — be sure to check them out too!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>vimeditor</category>
      <category>linux</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
