macvim-dev / macvim

Vim - the text editor - for macOS
https://macvim.org
Vim License
7.5k stars 681 forks source link

After opening a new file, the initial mode is 'insert/entry' #1248

Closed ccjon closed 2 years ago

ccjon commented 2 years ago

This may be feature-related and not a bug per se, since it seems like the current mode (eg, insert/entry) is a global attribute to all tabs or windows; but I'm so used to assuming the default mode is 'command' that I tend to immediately begin typing commands which can get me in a messy place :) This never occurs running vim in the Terminal, since there's just one buffer I suppose and no states to save.

If you want a feature request plz advise how to file

Thanks

version: Custom Version 8.2.3455 (172) ... installed via Official Releases $ vim --version --> VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 14 2021 20:35:46) Included patches: 1-503, 505-680, 682-1283, 1365 Compiled by root@apple.com Normal version without GUI. Features included (+) or not (-): +acl +file_in_path -mouse_sgr +tag_old_static -arabic +find_in_path -mouse_sysmouse -tag_any_white +autocmd +float -mouse_urxvt -tcl -balloon_eval +folding +mouse_xterm -termguicolors -browse -footer +multi_byte -terminal +builtin_terms +fork() +multi_lang +terminfo +byte_offset -gettext -mzscheme +termresponse +channel -hangul_input +netbeans_intg +textobjects +cindent +iconv +num64 +timers -clientserver +insert_expand +packages +title -clipboard +job +path_extra -toolbar +cmdline_compl +jumplist -perl +user_commands +cmdline_hist -keymap +persistent_undo +vertsplit +cmdline_info +lambda +postscript +virtualedit +comments -langmap +printer +visual -conceal +libcall -profile +visualextra +cryptv +linebreak +python/dyn +viminfo +cscope +lispindent -python3 +vreplace +cursorbind +listcmds +quickfix +wildignore +cursorshape +localmap +reltime +wildmenu +dialog_con -lua -rightleft +windows +diff +menu +ruby/dyn +writebackup +digraphs +mksession +scrollbind -X11 -dnd +modify_fname +signs -xfontset -ebcdic +mouse +smartindent -xim -emacs_tags -mouseshape +startuptime -xpm +eval -mouse_dec +statusline -xsmp +ex_extra -mouse_gpm -sun_workshop -xterm_clipboard +extra_search -mouse_jsbterm +syntax -xterm_save -farsi -mouse_netterm +tag_binary system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" defaults file: "$VIMRUNTIME/defaults.vim" fall-back for $VIM: "/usr/share/vim" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X_UNIX -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: gcc -L/usr/local/lib -o vim -lm -lncurses -liconv -framework Cocoa $ defaults read org.vim.MacVim | grep 'MM|SU' --> MMAutosaveColumns = 169; MMAutosaveRows = 56; MMCurrentPreferencePane = General; MMOpenInCurrentWindow = 1; MMTopLeftPoint = "{83, 766}"; MMZoomBoth = 1; "NSWindow Frame SUUpdateAlert" = "330 288 620 392 0 0 1280 777 "; SUEnableAutomaticChecks = 1; SUHasLaunchedBefore = 1; SULastCheckTime = "2022-06-26 20:49:06 +0000"; SUSendProfileInfo = 0; SUUpdateGroupIdentifier = 1187021904; SUUpdateRelaunchingMarker = 0;

OS version: 10.14.6 (18G9323)

eirnym commented 2 years ago

@ccjon thanks you for an issue,

I don't observe this on my computer, so could you please tell us following information:

eirnym commented 2 years ago

Additionally I've found, that it's possible to add star[tinsert] in your vimrc file to enter insert mode by default. I believe it could be the case. Could you please check your configuration and plugins for it?

ychin commented 2 years ago

@ccjon do you have an update? As @eirnym said Vim could be configured to start in insert mode. How are you getting MacVim, and how are you launching it? You can try to launch it via mvim --clean (you can find mvim at /Applications/MacVim.app/Contents/bin/mvim if you don't have it configured in your path) and see if this replicates.

As for why it's happening in MacVim GUI and not terminal, it could also be your gvimrc which only gets loaded in GUI mode.

I'm just closing this for now, but we could reopen it later if we get a response to help trim down the list of open issues.