Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

The tag has no usage guidance.

1
vote
2answers
67 views

Change Case of last searched pattern

I often use # key to quickly search for a keyword. I want to change the case of the last searched pattern in the easiest possible way. One way to do this is to use \U\1 in the substitution part and ...
0
votes
1answer
54 views

How do you make the command mode case insensitive?

For example, I might accidentally type something like :WQ and I want it to work like :wq when a hit enter Another case is where I am typing a longer command name, for example NERDTreeTabsClose. (Note ...
0
votes
1answer
29 views

How do I substitute two same words (of different cases) to another two words whilst retaining their original cases?

I am sorry that my English was not good enough to clearly describe the task in the title. Here is a more descriptive attempt. Let us say I have the following text \gls{tla}{TLA} (As a side note, ...
0
votes
2answers
74 views

How to make f{char} case insensitive?

Regarding this command: f{char} To [count]'th occurrence of {char} to the right. The cursor is placed on {char} |inclusive|. {char} ...
3
votes
3answers
276 views

Caps Lock in insert mode only

Sometimes, such as when transcribing FORTRAN code, I find it useful to enter uppercase letters without holding down the Shift key. However, enabling Caps Lock is a problem in command mode. Here is my ...
0
votes
2answers
72 views

Prohibit unintentional ~ from F6 button

I have a mapping to remove trailing whitespace, defined like this: nnoremap <silent> <F6> :%s/\s\+$//<CR>''. It works fine, except that if I press Esc before pressing F6, instead of ...
3
votes
1answer
241 views

Disable case sensitive auto-completion, while “smartcase” search is enabled?

I like the behavior of smartcase while searching, and I like Vim's auto-completion options, but I don't like them together. Is there any way to keep smartcase enabled, but have auto-completion results ...
4
votes
2answers
86 views

Is there a way to use ignore case only for autocompletion in insert mode?

I know I can :set ignorecase smartcase to get autompletion to be case-insensitive but this has the side-effect of making all searches case-insensitive unless they contain an uppercase character. I ...
1
vote
2answers
311 views

Case Insensitive Search with g ex command?

How can you do a case insensitive search with line contexts displayed in vim while using the :g ex command? I tried the following but it doesn't seem to work... g/pattern/z#.1i|echo "================...
-3
votes
1answer
129 views

Make gvim show Q letter (character) [closed]

My vim doesn't represent the uppercase letter q Q? How to fix this? Here is my vimrc : set nocompatible " be iMproved, required filetype off " required syntax on set ...
2
votes
2answers
122 views

make external command completion case insensitive when called from within Vim

I've been learning Vi/Vim for some month and, at the moment, I'm editing many files at once splitting the window, jumping from one buffer to the others. I find it very useful. One thing I don't like ...
6
votes
1answer
87 views

Convert word to another substituting case (upper or lower) with same case

I am looking for a way to convert one word to another while "capturing" the case of the match that is substituted. An example: I have the text: Begin the beginning Now I want to convert this to ...
1
vote
1answer
61 views

How can you change the case of a backreference in Ex-mode substitute command?

For instance, let's say I want to change all instances of Ctrl-m, Ctrl-p, etc., in a document to the more conventional ^M, ^P, etc. I can use :s/Ctrl-\(.\)/^\1to almost accomplish this, but it leaves ...
14
votes
4answers
1k views

How can I convert words to camelCase in a macro?

I have a list of words, like this: these are some words that I want to convert to camel case I need a way to turn, for example, camel case into camelCase within a macro (or a way to turn every line ...
17
votes
1answer
606 views

How to make movements respect camelCase or snake_case?

It is common to use either camelCase or snake_case to separate multiple words which form an identifier. It would be nice if the "word" movements (b, w, e) would detect those inner-identifier ...