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

Questions tagged [echo]

The tag has no usage guidance.

0
votes
0answers
14 views

How to show “/foobar match 1 of ” or “E486: Pattern not found: foobar” in commandline when calling `normal! n` in function

I'm calling normal! n in a vimscript function. If there is a match, I don't get the message /foobar match 1 of 3 in the commandline. If there is no match, my commandline shortly flickers up and down ...
1
vote
1answer
49 views

How to have the echo command process newline characters?

I find that when running :echo message with a message variable that contains newlines, it displays the newline character as ^@. Often I'd prefer it to actually be split on a new line though. Do I ...
1
vote
0answers
29 views

return value of execute(command) when command has “silent!”

In my understanding, the return value of execute(command) should be what command outputs. (The second parameter of execute is to affect whether this output will also be displayed in vim.) Now command ...
2
votes
1answer
88 views

Can't echo messages from inside async functions

CASE 1: Have your autocmd command be setup like this: autocmd User ALELintPost call SayHello() " ALELintPost is async And your SayHello function set up like this function! SayHello() abort ...
1
vote
1answer
244 views

How to print an option's value to standard output?

I'd like to know if a file uses LF or CRLF line endings. I'm on Windows with vim installed. I don't want to convert the files, just know which line endings they use. I know I can get the file format (...
1
vote
0answers
102 views

Why are [$p] characters appearing at the beginning of every file? [duplicate]

Every file I open in vim lately, even new empty files, as a ($p) at the beginning. This does not appear to be real - inserting text overwrites it, and once it's overwritten it does not return. I ...
0
votes
1answer
239 views

How to echo a command but avoid the “hit enter” prompt

I have found how to silently execute a command with :silent, but I actually would like to echo the command being executed, without getting into this "hit-enter" prompt. How to do it? My example is a ...
1
vote
3answers
290 views

Execute() is not returning a value

I am apparently not getting a return value from execute(): function! Example() return 5 endfunction :echo execute("call Example()") Just results in a blank line. The 5 is not printed. Why is ...
0
votes
3answers
73 views

How can I echo the result of function with a range?

If I have a function that takes a range, how can I echo the return value of the function? For example, the following does not work: :echo 2,8call MyFunction()
0
votes
1answer
106 views

Error occurs while echoing system('echo %PATH%')

I'm currently using gvim 8.0 on Windows 10. When I try to do the following command, :echo system('echo %PATH%') I get the following error. E484: Can't open file C:/Users/BITS_A~1/AppData/Local/Temp/...
3
votes
1answer
487 views

Echo highlighted warning in one line

I found from the vim's manual that we can echo colored text by the following command: :echohl WarningMsg | echo "Warnging" | echohl None | echo ":Some warning" which will highlight the string ...
1
vote
2answers
222 views

How can I echo non-printable characters like spaces?

If I have non-printable characters assigned to a variable, how can I echo them? For example, if I have a variable xyz set to be two spaces and a tab, then if I do this: :echo xyz it just shows a ...
0
votes
1answer
37 views

Wrapping echo for use in VimL

I'm attempting to add some debugging functionality to a small vim plugin that I am working on. I'd like to wrap echo / echom in a way that allows me to turn off output if I want. I've attempted to do ...
6
votes
1answer
554 views

Echo message on startup without prompting

I'd like to echo a custom message upon startup, based on whether or not certain startup functions were successful. I tried this in my .vimrc echo 'test' "All my settings ... I'd like vim to echo a ...
3
votes
3answers
496 views

No echo command?

I tried doing the following command on a new install of Ubuntu and got a "Sorry, command not supported on this version message": :echo @% How could any version of vim not support echo? The reported ...