Questions tagged [echo]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
43 views

How can I log debug messages without blocking?

When debugging my vimrc, I often want to log informational messages, e.g. things like "skipping function X because a necessary plugin isn't available". I can use echom statements to do that, but they ...
2
votes
1answer
61 views

How to create Preview window to display a string?

I'm using a LSP plugin to call a command from the server, and currently it is logging the data using echom. My current code is like this: function! PtypeCallback(result) echom json_encode(a:...
0
votes
0answers
23 views

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

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
280 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
34 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
223 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
294 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
157 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
319 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
469 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
149 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
138 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/...
4
votes
1answer
859 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
262 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
50 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 ...
8
votes
1answer
919 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 ...
2
votes
3answers
601 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 ...