Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [execute]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
29 views

Special characters, escaped special characters, escape sequences, and terminal codes

I refer to those 4 terms using terminology picked up by various sources: Steve Losh, in his Learn Vimscript the Hard Way's chapter 16 refers to things like <cr> (these 4 characters typed in a ...
user avatar
  • 1,572
0 votes
1 answer
40 views

Weird behavior when execute and echo are used together

So I was doing some testing on some function I made, let's call it Test_mode, "let g:Test_mode = 0 " commented to show that it works without defining it first function! Test_mode() if g:...
user avatar
0 votes
1 answer
55 views

How to `source` a path stored in a variable in Vimscript

tldr: The title pretty much summarizes the entirety of the question I am trying to make my configuration more adaptable to different machines so that I can use git to keep them in sync between my ...
user avatar
4 votes
2 answers
61 views

Advice on the use of :exe "norm!" vs. built in functions when writing vimscipt and plugins

I've been using vim for about 3 years and am starting to write my first plugin. I've noticed when looking at the code of other popular plugins that the functions very rarely seem to achieve their aim ...
user avatar
  • 866
0 votes
0 answers
39 views

vim execute not working in script

I am using a plugin that expands the word template by a template but only if the word template is followed by a tab. I am trying to write the word new then in insert mode jump to the end of the line ...
user avatar
2 votes
0 answers
46 views

Make Lightspeed work with Repmo

I'm trying to make the EasyMotion-like (cursor jumping) Lightspeed plugin work with Repmo which repeats a previous motion. So far, (and after many hours), I've come up with the following: let g:...
user avatar
  • 2,221
0 votes
1 answer
40 views

execute normal command does not work as expected

I have this line in the buffer: * [X] determine how to add annotations #a475c217 I want to change it to this line: * [X] determine how to add annotations ==ANN== #a475c217 So I run this command ...
user avatar
  • 1,237
0 votes
0 answers
51 views

Vim :redir + :execute prepends the executed command and blank lines to the output

I have the following function and command, which is supposed to save the output of a command to a scratch buffer: function! ScratchCapture(cmd) abort echo a:cmd " Run and capture output in l:...
user avatar