Questions tagged [command-line]

Questions on ex- or colon-commands. For questions about command-line options used to launch the editor, use the [invocation] tag.

17 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
22 views

Tweak command-line position and size

The command-line is obviously a very convenient tool in vim. However, especially when working with splits, it can feel uncomfortable to have to look back and forth between window and command-line (e.g:...
3
votes
0answers
47 views

:tabonly does not close all unmodified tabs if there is a modified tab in the way

Create some test files, touch a b c d and open each in a tab, vim -p a b c d Modify file b. Go to tab c and issue :tabonly. Expected behavior: a and d tabs are closed. b is not closed because it is ...
3
votes
0answers
466 views

Set maximum cmdheight

Is there a way to limit the command area in vim? When typing a long command, cmdheight is "temporarily increased", but I like to limit it to one line. What I currently have is illustrated on the ...
3
votes
0answers
177 views

Directory symlink browsing moves me to new location when autochdir is set

I have a symlinked directory as such: ~/nested Which points to this directory: ~/whatever/yetanother/andanother/nested When I launch gvim or command line vim (7.4, with the standard, built-in ...
3
votes
0answers
1k views

How can I undo last command in command line?

In general, is there a way to UNDO the last "meta" command (I mean a command entered in command line to manage a window ), or some equivalent keystroke sequence ? Btw, I know the u (= undo) and CTRL-...
2
votes
0answers
119 views

Bash process substitution on vim command line?

I want to be able to show someone a particular file's undo history in vim, remotely. It's a little complicated, so let me explain one step at a time. For starters, I can set a custom undofile and ...
2
votes
0answers
144 views

How can I view all of the vimscript run by a command? (neovim)

I want something similar to what I get when I enter debug mode and type "step", then enter and up, enter and up, ten thousand times... But without having to do all that work, allows it to be done ...
2
votes
1answer
27 views

Options from external commands in vim?

If I run from the vim terminal :! zathura foo.pdf It opens foo on top of the terminal and when I exit I go back to the vim file. If instead I try: :! zathura --fork foo.pdf The intended behaviour is ...
1
vote
1answer
29 views

Different word boundaries in command mode

I very commonly use CTRL-W to adjust a previous path in the command line, like I'll bring up the directory of the current file or perhaps a previous :e ... command from history that's close, and use ...
1
vote
0answers
28 views

Why does Gvim treat ansi escape codes differently than Vim in python code?

The following python code uses ansi escape sequences to clear the terminal screen and change the text color to red. It then prints "Hello from Vim." print ('\033c\033[31m Hello from Vim.') In Vim I ...
1
vote
0answers
126 views

How vim doesn't expand Ex commands in autocmd?

I'm trying to pass a command to 'vim-tmux-runner' on each file save with au bellow. autocmd FileWritePost,BufWritePost *.py :VtrSendCommandToRunner python manage.py test <afile>:p:h:t Where: :...
1
vote
0answers
185 views

What encoding does :! use?

I'd like low-level control over exactly what bytes I send and receive from a process spawned from some vimscript. What encoding is used for communications with commands started with :!foo? Can I ...
1
vote
0answers
270 views

How do I get vim to autocomplete correctly for :! on Windows?

On Vim 7.3 on Windows, if I use Tab to autocomplete paths with nonstandard characters in many cases, it works fine. For example: :n 2016\ Posts\\feb\something.txt If I press Tab after '2' and 'f' ...
0
votes
1answer
15 views

Changing cpoptions only work in commandline

So i tried to change the setting from cpoptions, so i did: set cpoptions=aABceF on the commandline, where s for the star is missing (on purpose) and it seems to work fine but only if i do it in the ...
0
votes
0answers
19 views

Command (e.g. `g++`) does not point to the same binary when run from the terminal or from (neo)vim

I have NVIM v0.4.3 on macOS Mojave version 10.14.6 I have different version of g++ compilers on my machine and made the following alias in my .zshrc file: alias g++="/usr/local/bin/g++-9" ...
0
votes
0answers
78 views

Is it possible to copy block (given by range) multiple times in a single command?

Is there a way to copy a few times a given block from command-line mode, e.g. with the :t command? For example, how to copy the two lines (block) above the cursor -2,-1 to the current position ., 3 ...
0
votes
0answers
66 views

Strange glyph when moving commandline cursor

I recently tried vim for the (still in-dev!) Bash for Ubuntu on Windows. I noticed this odd glyph appearing on the commandline in vim - but only when moving across it. It flashes for one screen ...