Errors using Vim to commit

Windows 7 x64
I can not understand my error.


$ git config --global core.editor vim
$ git commit

.gitconfig way: editor = vim

E325: ATTENTION
Error: There was a problem with the vim editor. Send a message using the -m or -F option.


$ git config --global core.editor "'vim' -w"
$ git commit

.gitconfig way: editor = 'vim' -w

When Vim opens, it is empty, but should contain something like$ git diff


$ git config --global --unset core.editor
$ git commit

E325 WARNING Unlock
due to empty commit message.

I thought Vim was used by default.


$ EDITOR=vim
$ git commit

E325 WARNING Unlock
due to empty commit message.


$ vim --version

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun  1 2017 21:25:47)

: 1-606

  <alexpux@gmail.com>
    .
 (+)   (-) :
+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      +terminfo
++builtin_terms  +fork()          +multi_lang      +termresponse
+byte_offset     +gettext         -mzscheme        +textobjects
+channel         -hangul_input    +netbeans_intg   +timers
+cindent         +iconv           +num64           +title
-clientserver    +insert_expand   +packages        -toolbar
+clipboard       +job             +path_extra      +user_commands
+cmdline_compl   +jumplist        +perl/dyn        +vertsplit
+cmdline_hist    +keymap          +persistent_undo +virtualedit
+cmdline_info    +lambda          +postscript      +visual
+comments        +langmap         +printer         +visualextra
+conceal         +libcall         +profile         +viminfo
+cryptv          +linebreak       +python/dyn      +vreplace
+cscope          +lispindent      +python3/dyn     +wildignore
+cursorbind      +listcmds        +quickfix        +wildmenu
+cursorshape     +localmap        +reltime         +windows
+dialog_con      -lua             +rightleft       +writebackup
+diff            +menu            +ruby/dyn        -X11
+digraphs        +mksession       +scrollbind      -xfontset
-dnd             +modify_fname    +signs           -xim
-ebcdic          +mouse           +smartindent     -xpm
+emacs_tags      -mouseshape      +startuptime     -xsmp
+eval            +mouse_dec       +statusline      -xterm_clipboard
+ex_extra        -mouse_gpm       -sun_workshop    -xterm_save
+extra_search    -mouse_jsbterm   +syntax
+farsi           +mouse_netterm   +tag_binary
              vimrc: "/etc/vimrc"
           vimrc: "$HOME/.vimrc"
     vimrc: "~/.vim/vimrc"
            exrc: "$HOME/.exrc"
           defaults file: "$VIMRUNTIME/defaults.vim"
           $VIM  : "/etc"
    $VIMRUNTIME  : "/usr/share/vim/vim80
"
 : gcc -c -I. -Iproto -DHAVE_CONFIG_H   -D_FORTIFY_SOURCE=2
-I/usr/include/ncursesw  -march=x86-64 -mtune=generic -O2 -pipe
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
: gcc   -L. -pipe -fstack-protector -pipe -Wl,
--as-needed -o vim.exe     -lm    -lncursesw -liconv -lacl -lintl   -Wl,
--enable-auto-import -Wl,--export-all-symbols -Wl,
--enable-auto-image-base -fstack-protector-strong  
-L/usr/lib/perl5/core_perl/CORE -lperl -lpthread -ldl -lcrypt
+4
source share
2 answers

. , - . -, , (TL; DR? "" ).

VIM, , . , Shift + Insert Ctrl + V. , Windows, "" , Ctrl + Z ( ). ESC :q! , . VIM . Windows. OP , Git VIM ( commit rebase -i ..).

, , , VIM. Git VIM . , VIM.

, sweg .git , , COMMIT_EDITMSG. (*.swp) .

+4

Idk, , , .

0

Source: https://habr.com/ru/post/1683461/


All Articles