Closed Saafo closed 1 year ago
Can u reproduce it on other terminal emulator? Warp has it's own layout, some like tmux or nvim might have issue with it.
@CharlesChiuGit Yes, I can reproduce it on iTerm2
This is very weird, BufRead
autocmd is in the doc for a very long time. I think sth is wrong with the nvim u use.
How did u install nvim 0.9?
Well, I install and upgrade neovim through brew.
I revert all my changes in local (reset to current main branch), and the problem still exist
Can u try this version? https://github.com/neovim/neovim/releases/tag/stable
Yes I'm currently using this version. Do you mean I should uninstall nvim and install it through this way?
Download nvim-macos.tar.gz
Run xattr -c ./nvim-macos.tar.gz (to avoid "unknown developer" warning)
Extract: tar xzvf nvim-macos.tar.gz
Run ./nvim-macos/bin/nvim
ys!
I run ./nvim-macos/bin/nvim
and still can reproduce...
wait, u mean u want to open vim
inside nvim
's term mode?
I'm not sure whether it's related to my .vimrc, since I delete my .vimrc, the error message changed:
❯ vim
E1187: Failed to source defaults.vim
Error detected while processing /Users/saafo/Downloads/nvim-macos/share/nvim/runtime/plugin/rplugin.vim[66]..f
unction <SNR>9_LoadRemotePlugins[1]..<SNR>9_GetManifest[1]..<SNR>9_GetManifestPath:
line 7:
E117: Unknown function: stdpath
--- Autocommands ---
Error detected while processing /Users/saafo/Downloads/nvim-macos/share/nvim/runtime/plugin/shada.vim:
line 9:
E10: \ should be followed by /, ? or &
line 10:
E10: \ should be followed by /, ? or &
line 11:
E10: \ should be followed by /, ? or &
--- Autocommands ---
line 13:
E10: \ should be followed by /, ? or &
line 14:
E10: \ should be followed by /, ? or &
--- Autocommands ---
line 16:
E10: \ should be followed by /, ? or &
line 17:
E10: \ should be followed by /, ? or &
line 18:
E10: \ should be followed by /, ? or &
line 19:
E10: \ should be followed by /, ? or &
line 20:
E35: No previous regular expression
line 21:
E10: \ should be followed by /, ? or &
line 22:
E10: \ should be followed by /, ? or &
--- Autocommands ---
line 24:
E10: \ should be followed by /, ? or &
line 25:
E10: \ should be followed by /, ? or &
line 26:
E10: \ should be followed by /, ? or &
line 27:
E10: \ should be followed by /, ? or &
line 28:
E10: \ should be followed by /, ? or &
line 29:
E10: \ should be followed by /, ? or &
--- Autocommands ---
line 31:
E10: \ should be followed by /, ? or &
line 32:
E10: \ should be followed by /, ? or &
line 33:
E10: \ should be followed by /, ? or &
line 34:
E10: \ should be followed by /, ? or &
line 35:
E10: \ should be followed by /, ? or &
line 36:
E10: \ should be followed by /, ? or &
--- Autocommands ---
line 38:
E10: \ should be followed by /, ? or &
Press ENTER or type command to continue
my original .vimrc:
set nocompatible
syntax on
set showmode
set laststatus=2
set showcmd
set mouse=a
set encoding=utf-8
set t_Co=256
filetype indent on
set autoindent
set tabstop=2
set shiftwidth=4
set expandtab
set softtabstop=2
set number
set cursorline
set textwidth=120
set wrap
set linebreak
set wrapmargin=2
set scrolloff=3
set sidescrolloff=5
set ruler
set showmatch
set hlsearch
set incsearch
set ignorecase
set smartcase
set visualbell
set autoread
set listchars=tab:»■,trail:■
set list
set wildmenu
set wildmode=longest:list,full
if has('clipboard')
if has('unnamedplus') " When possible use + register for copy-paste
set clipboard=unnamed,unnamedplus
else " On mac and Windows, use * register for copy-paste
set clipboard=unnamed
endif
endif
wait, u mean u want to open
vim
insidenvim
's term mode?
Yes exactly! open vim
in nvim
's emulate terminal
Can reproduce in ubuntu22.04.
I think this is basically impossible to do. It's not a nvim config issue.
I tried with nvim --clean
and the result is still the same.
So I think using vim inside nvim is forbidden by god.
But u can try nested nvim if u know how to use rpc correctly.
Fell free to comment if u have some new insights!
This is expected, since $VIMRUNTIME
is set to Neovim's runtime. Please unset it before running vim in :terminal
. Remember that vim
and nvim
share the vast majority of options.
cc @Saafo @CharlesChiuGit
I argue this problem because I use Lazygit in nvim
's terminal, and when I wrote commit message, it will open editor.
I'll try to set $EDITOR
env to nvim to avoid open vim in nvim.
I argue this problem because I use Lazygit in
nvim
's terminal, and when I wrote commit message, it will open editor.I'll try to set
$EDITOR
env to nvim to avoid open vim in nvim.
Yep this will do the trick 👍
This is expected, since
$VIMRUNTIME
is set to Neovim's runtime. Please unset it before running vim in:terminal
. Remember thatvim
andnvim
share the vast majority of options.cc @Saafo @CharlesChiuGit
No luck for me. QAQ
@CharlesChiuGit u need to set VIMRUNTIME=vim
, back to the defaults 😄
Looks like you need to manually specify rtp for vim:
export VIMRUNTIME=/usr/share/vim/vim90 # replace this with your vim rtp
unset VIM
It can enter vim after pressing enter
, but it's too much work to do lol
I argue this problem because I use Lazygit in nvim's terminal, and when I wrote commit message, it will open editor. I'll try to set $EDITOR env to nvim to avoid open vim in nvim.
That's what i did too lol
It can enter vim after pressing
enter
, but it's too much work to do lol
Yep nvim -u ~/.vimrc
would suffice if the user insists on wanting vim
's behavior lol
Closing as the original issue has been resolved.
Version confirmation
Following prerequisites
Neovim version
0.9.0
Operating system/version
macOS 13.2.1
Terminal name/version
Warp
$TERM environment variable
xterm-256color
Branch info
main (Default/Latest)
Fetch Preferences
HTTPS (use_ssh = false)
How to reproduce the issue
Expected behavior
no error should print before open vim
Actual behavior
error printed before open vim:
Additional information
No response