I have two problems:
- I can not correctly register the address for
core.editorin the terminal; - Using vim results in an incomprehensible error;
It so happened that the first time I use the terminal and the first time I see vim . After the first $ git commit , there was no error, vim opened, but I was confused and trying to close the editor could have done something bad, but I donβt even imagine what.
Yes, $ git commit -m "text" works. But without -m should work too. As far as I know, the result should be sent to the editor $ git diff and I want to find out what Iβve done.
The $EDITOR seemingly empty (the result is an empty string).
Git reinstalled, computer restarted.
By itself, $ vim works.
$ git config --global core.editor "'C:/Program Files/Git/usr/bin/vim'" $ git commit In the .gitconfig file .gitconfig address looks like this: editor = 'C:/Program Files/Git/usr/bin/vim'
E325: ATTENTION
Aborting commit due to empty commit message.
After this message, I can do nothing in the terminal.
$ git config --global core.editor vim $ git commit In the .gitconfig file .gitconfig address looks like this: editor = vim
E325: ATTENTION
Error: There was a problem with the editor 'vim'. Please supply the message using either the -m or -F option.
After this message, I can do nothing in the terminal.
$ git config --global core.editor /usr/bin/vim $ git commit In the .gitconfig file .gitconfig address looks like this: editor = C:/Program Files/Git/usr/bin/vim
C: / Program Files / Git / usr / bin / vim: C: / Program: No "C: / Program Files / Git / usr / bin / vim".
Please supply the message using either the -m or -F option.
$ git config --global core.editor "C:/Program Files/Git/usr/bin/vim.exe" $ git commit In the .gitconfig file .gitconfig address looks like this: editor = C:/Program Files/Git/usr/bin/vim.exe
C: / Program Files / Git / usr / bin / vim.exe: C: / Program: No C: / Program Files / Git / usr / bin / vim. exe '. Please supply the message using either the -m or -F option.
$ 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
Sublime Textwith the-wflag, but after saving and exiting, I get an error, anempty commit message. I do not know how to fix it yet. - serkenempty commit messagewhen I realized that there must be at least 1 uncommented symbol. As a result, Sublime Text works, but Vim does not. What is wrong with Vim don't understand. - serken.gitconfigfile put a.gitconfigbefore the space in theProgram Filesfolder name. - mymedia