Questions tagged [startup]

Activity that occurs after invocation but before the first document is displayed

Filter by
Sorted by
Tagged with
2 votes
1 answer
62 views

Neovim is looking for configs in current directory, how do I fix this?

I am trying to configure neovim by adding plugins via lazy in my C:\User\{username}\AppData\local\nvim folder. However when I try to use neovim it only works in the nvim folder and no where else. I ...
Hello's user avatar
  • 21
0 votes
1 answer
58 views

How to open the last modified file at startup?

As every user in this community understands, launching Vim using the command line without using any arguments or flags will edit a blank buffer with the :intro screen. Some distributions and utilities ...
KhodeNima's user avatar
  • 131
-1 votes
2 answers
42 views

Set key to toggle full screen in MacVim

I use Vim from bash and I use MacVim as a UI in macOS. I max out my desktops, and try to keep "1 app per desktop", so MacVim sits into its own desktop. Except that the app starts in full ...
jalanb's user avatar
  • 684
3 votes
1 answer
675 views

How to make Vim start at the end of a template?

I have skeleton template files for various filetypes, and when I create a new file based on these templates, the cursor always starts at the top of the file. It would be more convenient if it started ...
paradroid's user avatar
  • 367
0 votes
2 answers
59 views

Change what Vim does by default when no files are given

When running vim with no command line arguments, it opens a splash screen describing Vim. I would like to control what vim does "by default", so I can make it do something more useful like ...
Greg Nisbet's user avatar
  • 1,839
0 votes
0 answers
455 views

How to display ASCII art in Neovim startup screen without plugin?

Here's the ASCII art image I want to display in nvim dashboard: " ", " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛...
Mega Bang's user avatar
  • 199
1 vote
1 answer
143 views

Why is my Vim startup dominated by "first screen update"?

I'm trying to investigate why Vim startup is pretty slow. vim -u NONE and the like are extremely fast as expected, so it is obviously my config/plugins, but what strikes me, is that most of the time ...
fbence's user avatar
  • 667
0 votes
1 answer
49 views

How do I position cursor according to filetype (gitcommit)?

Sometimes on start, the cursor is not at the top in gitcommit buffers. I assume that this is because it wasn't on the first line the last time I exited a gitcommit buffer and the position was saved in ...
paradroid's user avatar
  • 367
0 votes
0 answers
76 views

Neovim startup: faster on the second run, how do I warm it up?

I noticed that the second time I run nvim it loads much faster (on Windows 11). Ideally, what I want is this something like nvim --warmup-then-exit, which I would run on session startup/login. How ...
Guy Langston's user avatar
0 votes
2 answers
254 views

Writing a bash script to startup Vim in a particular configuration for a project

I want to write a bash script that starts up a Vim session using a specific configuration. For instance consider a C project with the following structure project_dir - src - file1.c - file2.c ...
Sina's user avatar
  • 115
0 votes
1 answer
240 views

E824: Incompatible undo file when opening init.vim

I get this error E824: Incompatible undo file: /root/.cache/nvim/undo/%root%.config%nvim%init.vim Press ENTER or type command to continue when trying to open init.vim. When then pressing ENTER it ...
Mate Mrše's user avatar
0 votes
1 answer
64 views

NeoVim runs part of mapping while starting

I am using a Raspberry Pi for learning C. I use NeoVim and Mingw-GCC on the Pi over SSH. Building is done with a custom script named build. Initial builds were done by calling ./build from the command ...
Supragy Mishra's user avatar
1 vote
1 answer
261 views

Run `vim -c <command>` before loading vimrc?

I'm adding some setup to my .vimrc, and what I want to do is to be able to run a command using the command line before the vimrc is executed. I tried vim -c 'command' but it runs after the .vimrc. The ...
Siddharth Shyniben's user avatar
0 votes
1 answer
126 views

Global plugins source only once? [closed]

So here is a little experiment: with a clean config (i.e., no previous ~/.vimrc or ~/.vim/), do: $ mkdir -p ~/.vim/plugin/ $ vim ~/.vim/plugin/foo.vim And in that file, enter the following, save &...
wmnorth's user avatar
  • 123
0 votes
1 answer
417 views

Press ENTER each time Vim starts [duplicate]

Each time Vim (v8.2) starts, it shows a subset of my key bindings, and awaits a keypress, like this: n <Space> * za n ,<Space> * :nohlsearch<CR> n Q * <Nop> ...
mwil.me's user avatar
  • 101
0 votes
2 answers
330 views

How do I sync my vimfiles with Dropbox or other cloud storage?

I followed the directions in this post to sync my vimrc file in Dropbox with my two Windows computers. However, I also want to move all the other user content of my vimfiles folder to Dropbox as ...
Norbert-op's user avatar
1 vote
1 answer
901 views

Load plugins in vim started with --noplugin

I have my $EDITOR set to vim --noplugin -n -i NONE +star, which is what I usually want when committing with git etc. However, sometimes I decide I need those plugins (the builtin ~/.vim/pack kind, ...
usretc's user avatar
  • 375
0 votes
1 answer
66 views

Command not working when mapped

I've mapped CTRL+Meta+n to :split | resize 15 | term. This command works when run from Vim, but when I put the command in my .vimrc, on Vim startup, I get the following error: zsh:1: parse error near '...
twlscnds's user avatar
  • 103
1 vote
2 answers
106 views

welcome message hidden by "exe" in timer function

My vimrc holds a script to change the color of the CursorLineNr conditionally based on the mode. My problem is that it hides vim's welcome message when it's launched without a file. I would like to ...
Biggybi's user avatar
  • 2,720
1 vote
1 answer
318 views

How to open netrw at each vim session but have the cursor on the code (and not on the tree) when opening

I found the following chunk of command on this blog to have a file browser open by starting vim that I added to my .vimrc. It splits the window into 2 panes: a file browser and the text editor. The ...
ecjb's user avatar
  • 149
1 vote
1 answer
32 views

Better folding on file open -- based on file length?

I like having files be opened folded, specially when they are large. However, when they are small, it can be an overkill (like a markdown file with a single heading). In such cases, I'd like to open ...
Peeyush Kushwaha's user avatar
1 vote
2 answers
5k views

Portable NeoVIM configuration / Folder confusion

I'm attempting to create a portable Neovim configuration for Windows. I'm a bit confused about all the directories. Maybe someone can shed a little light on me :) So I downloaded a pre-built archive ...
Piglet's user avatar
  • 175
2 votes
1 answer
364 views

Intermittent slow startup

I have a strange issue. Sometimes (not every time, but often enough) the startup is extremely slow (ten seconds or more). Most of the time, when I run vim next time, it starts reasonably fast. Then in ...
n. m. could be an AI's user avatar
4 votes
3 answers
1k views

Is there a shorter way to start vim with scratch buffer?

Often times I use vim as a scratchpad - I just want to throw some text in there, maybe copy it to the clipboard, or munge it a bit, but it's not really important to keep it around. Most of the time I ...
Wayne Werner's user avatar
2 votes
0 answers
275 views

gVim very slow start with guioptions-=T

I'm experiencing the problem with gvim taking ~20 secs to start when I have guioptions-=T in my .vimrc. Tried both version 8.1.0875 and 8.2.0121 I found this bug report which is now closed, but the ...
Matteo Riva's user avatar
5 votes
1 answer
851 views

Interpreting the output when using --startuptime

When I use the --startuptime <file> option, vim generates an output file. I've included an example at the bottom of this post. How can I interpret the output? I can't find documentation to ...
dannyadam's user avatar
  • 482
2 votes
2 answers
2k views

Initial vim startup with small vimrc gives error "No such group or event: filetypedetect"

Using Vim 7.4. My ~/.vimrc file consists only of the following: set nocompatible filetype off If I run vim with verbose logging level 2 by using the following command: vim -V2./file.log .vimrc ......
MrSnrub's user avatar
  • 431
1 vote
1 answer
269 views

Ignore some files when using viminfo+=%

I use in my vimrc the following option: set viminfo+=% This allows vim to open the last edited files if you don't pass any arguments to vim. Is there a way to ignore some files? I want to disable ...
matt's user avatar
  • 113
2 votes
2 answers
93 views

Incremental search for text from the command line

I'm trying to create a zsh alias that will start vim and search backwards from the end of the file for a given string. I learnt about +normal and can do something like this to start vim at the end of ...
jogloran's user avatar
  • 123
5 votes
2 answers
2k views

How to load files as a quickfix window at start-up

I have a command-line tool that can print search results in a format that works with vimgrep. The example output looks like this: foo/path/lib/usdviewq/appController.py:3795:22: index = prim....
ColinKennedy's user avatar
2 votes
1 answer
963 views

Is there any way to execute ex command without adding it to the command history?

When I start vim, I always use -s SCRIPT_FILE_NAME option to execute additional commands. In SCRIPT_FILE_NAME, some ex commands are written. Let COMM denote the additional commands in the file. The ...
ynn's user avatar
  • 279
1 vote
0 answers
117 views

How to avoid dialog box when using echo in vimrc/gvimrc file?

If there is a echo/echom sentence in the vimrc or gvimrc file, a dialog box is popped out when gvim starts. How to avoid this?
Grinny Green's user avatar
0 votes
0 answers
47 views

How to prevent certain files from being sourced

I am not happy with the behavior of the indent/html.vim file, so I made a custom one in ~/.vim/indent/html.vim. However, vim -V2 still revealed to me that the /usr/share/vim/vim80/indent/html.vim is ...
Hielke Walinga's user avatar
0 votes
0 answers
121 views

Don’t start in insert mode when opening a shell script

How can I prevent vi from starting in insert mode when opening a "test.sh"-like file with the vi-plugin "bash-support" v4.3 ? When I vim test.sh it opens in insert mode When I vim .vimrc it opens in ...
McErroneous's user avatar
3 votes
1 answer
450 views

How to find all scripts which modified a certain vim setting?

I can figure out which script changed a vim setting the last time with :verbose set errorformat? However, sometimes a setting is modified/appended several times and I want to see all scripts who ...
Hotschke's user avatar
  • 4,740
3 votes
0 answers
241 views

How to get vim on Windows to start quickly

I installed Vim 8.1 with all the default options on Windows 10. I didn't modify vimrc. It takes more than 5 seconds to launch Vim (or gvim) each time I edit a file, and has just as long of a delay ...
Jeremy Stein's user avatar
4 votes
0 answers
420 views

Pressing CTRL-O twice is required to return to previous entry in jumplist

When I start vim and I want to return to the last location in the jump list, I would like to do so with a single <C-O>. However, right now I have to press twice <C-O><C-O> to achieve ...
Hotschke's user avatar
  • 4,740
0 votes
1 answer
299 views

May I have a Vim session report its "Mode" in its "Window Title"?

Clarification of the moving parts First, let me clarify what I mean by "Window Title", and what I expect to achieve On Windows OS, GUI programs will have three attributes: its Window Title texts, ...
llinfeng's user avatar
  • 352
1 vote
1 answer
1k views

Vim slow to open buffers, but not specifically in any sourcing plugin step

I'm using Vim primarily for rails projects, and have found a fairly significant difference in the start up time between a couple of my projects. Here's one project's startuptime log, while opening a ...
ttrmw's user avatar
  • 21
3 votes
2 answers
945 views

Specify GDB version for Termdebug

I am trying to use :Termdebug in Vim 8.1 on a CentOS machine. The default version of GDB at /usr/bin/gdb is less than the required v7.12. However, I have newer versions of GDB within devtoolset ...
Wil's user avatar
  • 31
1 vote
2 answers
1k views

How to make Vim open empty buffer with CWD set when opening a folder?

At the moment when I run nvim path/to/folder/ it opens up the netrw window for it (more accurately, the Dirvish window for it), I'd like this to not be the case. Ideal behaviour is that: when I do ...
greduan's user avatar
  • 119
5 votes
1 answer
4k views

Delay before running vim command?

This is probably just a bandaid for a greater problem, but I had the following code for MacVim (GUI mode) in my .vimrc autocmd GUIEnter * winpos 100 50 The problem is it's not working properly on ...
Tallboy's user avatar
  • 177
1 vote
0 answers
196 views

Weird sequence of characters temporarily when opening file

I know the title isn't all too descriptive but I don't have a better way to describe it. Whenever I open a file with vim (but interestingly not nvim), a bizarre sequence of characters shows under the ...
ericmarkmartin's user avatar
1 vote
1 answer
606 views

Hide bottom message when open new file

As title, is there any options in vim that can do that? Need a way to control messages system in vim, and as usual even hard-coded, still need preserve some options for users.
Tuyen Pham's user avatar
  • 1,306
7 votes
1 answer
704 views

Strange vim/xterm interaction: auto-insertion of `"` register when opening file

This one is driving me mad. I'm using XTerm(330) and the latest vim 8.0.1365 (on FreeBSD). Sometimes, not always, about 1 in 5, when I open a file with vim, a funny line is inserted above line 1. ...
Jens's user avatar
  • 363
3 votes
1 answer
1k views

Vim immediately sent to background

Whenever I call Vim from the CLI, either to edit a file (vim idk.tex) or without arguments, or run a command (vim +help), it gets sent to the background, as if I had pressed Ctrl+Z. In order to use ...
ayyylter's user avatar
3 votes
1 answer
65 views

Is it possible to open multiple files at the end or at the first occurrence of a string?

To open multiple files at a time I use this command (here using the vi tab feature): vim -p file1 file2 ... fileN If I want to open a file at the end or at the first occurrence of a text: vim + ...
Guillaume's user avatar
  • 133
0 votes
1 answer
89 views

vim bind to update initialization without restarting. How to add the loading of local .vimrc?

Here's my existing bind I'm looking to improve: nnoremap <Leader>L :so $MYVIMRC<CR>:runtime! after/plugin/*.vim<CR>:runtime! after/ftplugin/*.vim<CR> This doesn't work to ...
Steven Lu's user avatar
  • 2,249
11 votes
2 answers
14k views

How to execute a command on vim startup

I just installed a plugin for python which displays methods tree. So I would like to open the tree on startup, so not necessary to push the buttons everytime I open some .py file. But, I want this ...
St.Antario's user avatar
  • 1,107
11 votes
2 answers
678 views

Is there a way to edit secure data in vim without accessing the filesystem?

I am interested in using vim to edit a "secure" file, one that is stored encrypted elsewhere (say, somewhere in the cloud), and should not be written as plaintext to the local disk. So the sequence of ...
Greg Hewgill's user avatar