Skip to main content
added 134 characters in body
Source Link
Matt
  • 21.6k
  • 1
  • 13
  • 25

The question is how can I turn current words into upper case in the command line. I am aware of the command window.

Simply open the command window, process the command, and get back to the command line, all inside a single mapping:

cnoremap <C-U> <C-F>gUiww<C-C> 

" prevents the command-line window from remaining open after <C-C>
" works in Vim (but not in Neovim)
set lazyredraw

The question is how can I turn current words into upper case in the command line. I am aware of the command window.

Simply open the command window, process the command, and get back to the command line, all inside a single mapping:

cnoremap <C-U> <C-F>gUiww<C-C>

The question is how can I turn current words into upper case in the command line. I am aware of the command window.

Simply open the command window, process the command, and get back to the command line, all inside a single mapping:

cnoremap <C-U> <C-F>gUiww<C-C> 

" prevents the command-line window from remaining open after <C-C>
" works in Vim (but not in Neovim)
set lazyredraw
added 104 characters in body
Source Link
Matt
  • 21.6k
  • 1
  • 13
  • 25

The question is how can I turn current words into upper case in the command line. I am aware of the command window.

You mean kind of this?Simply open the command window, process the command, and get back to the command line, all inside a single mapping:

cnoremap <F12> <C-F>byiwel:letU> @0=toupper(@0)<CR><C-C><C<C-W><CF>gUiww<C-R>0C>

P.S. I'll debug and comment it later. For now, it's quite dirty, I know.

You mean kind of this?

cnoremap <F12> <C-F>byiwel:let @0=toupper(@0)<CR><C-C><C-W><C-R>0

P.S. I'll debug and comment it later. For now, it's quite dirty, I know.

The question is how can I turn current words into upper case in the command line. I am aware of the command window.

Simply open the command window, process the command, and get back to the command line, all inside a single mapping:

cnoremap <C-U> <C-F>gUiww<C-C>
Source Link
Matt
  • 21.6k
  • 1
  • 13
  • 25

You mean kind of this?

cnoremap <F12> <C-F>byiwel:let @0=toupper(@0)<CR><C-C><C-W><C-R>0

P.S. I'll debug and comment it later. For now, it's quite dirty, I know.