Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I move to the next capital letter?

Tags:

vim

In vim I can use f followed by a character to go to the next occurrence of that character on the current line. For example, if I have the following (cursor position marked with |):

m|akeBinExprNode = undefined 

I can use fB to move to B and dtE to delete until before the E, leaving me with:

make|ExprNode = undefined 

I wonder if there's a way to do this that doesn't involve typing the exact character, i.e. some kind of motion that means "go to the next capital letter" and/or "go to right before the next capital letter".

like image 769
R. Martinho Fernandes Avatar asked Oct 31 '11 18:10

R. Martinho Fernandes


People also ask

How do you do capital letters on a keyboard?

Pressing the 'shift' key allows you to type capital letters and the symbols at the top of the keys. The 'shift' keys are on the left and right of the keyboard, with the arrow pointing upwards. For capital letters, hold down the 'shift' key and hold and type the letter.

How do you type capital letters on a keypad phone?

Double-tap the shift key for caps lock Want to type in ALL CAPS? No problem! Just double-tap the shift key and a blue indicator will light up. You'll know you're in all caps because the letter keys will change to uppercase.

What is it called when you capitalize the first letter of every word?

Title case, which capitalizes the first letter of certain key words. Sentence case, in which titles are capitalized like sentences. Initial case, where the first letter of every word is capitalized.

What is the capital letter?

Capital letters (also called upper case) are letters used at the beginning of a sentence and for a proper noun. They may also be used at the beginning of the important words in a title or sign. Capitalisation is the writing of a word with its first letter in upper case and the remaining letters in lower case.


1 Answers

When I searched for that I would be happy to just have the "native" solution: just enter in command mode:

/\u 

which stands for "search for an uppercase letter". After that just move between capital letters with n and N (shift + n).

like image 79
Anton Malyshev Avatar answered Sep 22 '22 21:09

Anton Malyshev