03. Navigating lines $, 0, ^, g_, -, +

We can navigate much more efficiently by navigating through lines. Use the following keys to move to: $ - end of line 0 - beginning of line Notice that some lines are really long, and thus wrap around. To see which lines are wrapped around, simply look at the line number to the left. Try navigating to the end of the line in this sentence. In the case where the line begins with with white space, use: ^ - first non-white space at the beginning of line g_ - first non-white space at end of line (this doesn't work in this interface, but it should when using external Vim). # Try using the above commands in a simple python code, which loves to use white space. def fib(n): if n < 2: return n return fib(n-2) + fib(n-1) You may also navigate through lines with indentations with the - and + keys: - - moves up to the first non-whitespace character + - moves down to the first non-whitespace character Notice that for "+" you have to press shift, then the "=" sign. In Vim terms, that's just too much work. What we can use instead is the [return] key. Try navigating through the first letters of this tricky paragraph! Challenge! Review Questions: 1) NavigatE Through This Line HittinG Only The CapitalizeD letteR. 2) How would you ignore punctuations while navigating through words? Solutions 1) (starting from the 1) Wewwwwewwwee 2) Use the upper-case counterparts - WEB.

Aching back from coding all day?

Acupressure Mat & Pillow

Aching back from coding all day? Try Back Problems

Relieve your stress, back, neck and sciatic pain through 1,782 acupuncture points for immediate neck pain relief. Made for lower, upper and mid chronic back pain treatment, and improves circulation, sleep, digestion and quality of life.

$$ Check price
144.87144.87Amazon 4.5 logo(1,890+ reviews)

More Back Problems resources

Take your Linux skills to the next level!

The Linux Command Line

Take your Linux skills to the next level! Try Linux & UNIX

The Linux Command Line takes you from your very first terminal keystrokes to writing full programs in Bash, the most popular Linux shell. Along the way you'll learn the timeless skills handed down by generations of gray-bearded, mouse-shunning gurus: file navigation, environment configuration, command chaining, pattern matching with regular expressions, and more.

$ Check price
39.9539.95Amazon 4.5 logo(274+ reviews)

More Linux & UNIX resources