Questions tagged [command-line-window]

In Vim's command-line window you can edit the command line just like editing text in any window.

Filter by
Sorted by
Tagged with
0 votes
1 answer
46 views

Why doesn't my cmdwin remapping work?

I'm trying to unmap the normal mode open cmdline-window bindings: nnoremap q: <NOP> nnoremap q? <NOP> nnoremap q/ <NOP> Do not have any effect, even though :verbose map q: shows it'...
4 votes
1 answer
2k views

Can the command-line be edited/navigated using Vim commands?

How can I edit the text of a Vim command I've started typing out in the Vim command line? Example: If I type out a long search and replace command and realized I made a mistake. Now I want to move ...
1 vote
1 answer
52 views

Is it correct that between a CmdlineLeave and a CmdwinEnter there must be a CmdlineEnter?

Given augroup Dummy autocmd! autocmd CmdLineEnter / echom "CmdLineEnter /" autocmd CmdwinLeave / echom "CmdwinLeave /" autocmd CmdLineLeave / echom "CmdLineLeave /&...
0 votes
0 answers
23 views

Entering command-line window from quickfix window opened by YCM results in inconsistent Vim state

I think I'm supposed to file a bug report, however I'm not sure if for Vim or for YCM, so I'm asking this question to better understand what is really happening. YCM has the :YcmCompleter ...
2 votes
1 answer
207 views

How to quickly search for today's date in a file?

Question How does one effectively find today's date in a file? The format of the date is given by GNU's date(1)'s command as: $ date '+%a %d-%m-%Y' Mon 16-08-2021 What I already tried This is how I ...
4 votes
0 answers
31 views

is it possible to get incremental and hl search when using "q/" search window mode

I've been using the "q/" mode for all my searches recently because it allows quick and ease of access to previous searches, but it lacks the ability to perform incremental searches and ...
3 votes
2 answers
1k views

How to create a new tab or window from a buffer?

I have several open buffers and want to open a buffer in :ls in a new tab or window. I have found a way to do accomplish this, either by first executing tabnew or C-w v and then selecting the buffer ...
7 votes
4 answers
2k views

How can I tell if I'm in the command window?

Extremely related to this except the answer there doesn't work I get the following error when entering command-line editing mode q: or Ctrl-F (when already in command mode) Error detected while ...
2 votes
0 answers
102 views

Go to current cursor position when invoking command-line edit mode

If I press v while using either the vi-mode zsh plugin or set -o vi in bash, it opens the line I'm working on in a full vim session. However, this puts my cursor at the beginning at the beginning of ...
0 votes
1 answer
59 views

Is there a way to stay in the command line window after executing a line?

I find the command-line window incredibly useful for experimenting with my vim environment. But it's annoying to have to type q: every time I execute a line with <CR>. Is there a way to execute ...
2 votes
1 answer
2k views

Commands history for vim commandline and :terminal [closed]

I want a way in which we can access a history of commands in terminal mode (and Vim/NeoVim's internal command line), just like in a normal bash terminal; i.e. if I press the up key it will scroll ...
6 votes
1 answer
846 views

Is there a way to disable the command line window?

Often the mechanism to end up in the command line window is a transposition typo q: instead of :q when I intend to be closing Vim. You can imagine the frustration at this point because the program ...
1 vote
0 answers
87 views

Trim/clear new line character from batch script at Windows7 with gvim

I want to put timestamp using Leaderts (\ts) I am using the following script timestamp.bat(Windows 7): @echo off cls echo|set /p=%date:~0,4%-%date:~5,2%-%date:~8,2% %time:~0,2%:%time:~3,2% and the ...
6 votes
3 answers
1k views

How do I switch between the command-line history and file panes?

When using the command-line history window, I'd like to go back to the file I use it on to see what I'm working with. When revisualizing a block of code (gv), the cursor will go to the top after ...
2 votes
1 answer
5k views

How to split window directly from command line? [duplicate]

I'm using Ubuntu system. I have files: A.txt, B.txt, C.txt I can split window in the following way: vim A.txt :vs B.txt // after entering into vim :vs C.txt Is there any way to achieve the same ...
4 votes
1 answer
103 views

Can the command-line window be entered without interrupting macro recording?

I'm having a problem using the command-line window (help cmdwin), which is extremely useful, but it doesn't play well with macros. cmdwin is invoked with q:, so if there is a macro being recorded, ...