[vim] Double quote is not interpreted as comment (#441)

48 views
Skip to first unread message

Nguyen Tien Thanh

unread,
Oct 7, 2015, 12:50:03 AM10/7/15
to vim/vim


Reply to this email directly or view it on GitHub.

Mohammed Arabiat

unread,
Oct 7, 2015, 1:56:11 AM10/7/15
to vim/vim

I think sharing the vimrc file or a minimal reproduction case would help put us on the right track

Nguyen Tien Thanh

unread,
Oct 7, 2015, 2:31:20 AM10/7/15
to vim/vim

@Tanjoodo The two lines above are my .vimrc file . To reproduce, do

source ~/.vimrc

Actually it happens with any .vimrc that has a comment line.

Christian Brabandt

unread,
Oct 7, 2015, 2:55:13 AM10/7/15
to vim/vim

Does it happen, if you start vim like this vim -u ~/.vimrc -N --noplugins?
Also please share your :version output

Nguyen Tien Thanh

unread,
Oct 7, 2015, 5:06:15 AM10/7/15
to vim/vim

@chrisbra It still happen if I do vim -u ~/.vimrc -N --noplugins to edit vimrc (I have no plugin though)
This is :version output (I'm using zsh by the way)

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Oct  7 2015 10:52:22)
MacOS X (unix) version
Included patches: 1-889
Compiled by tng...@Tiens-MacBook-Pro.local
Normal version without GUI.  Features included (+) or not (-):
+acl             -farsi           -mouse_netterm   +syntax
-arabic          +file_in_path    -mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           -mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     -tcl
+builtin_terms   -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         -gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
+clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   -perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    -keymap          +postscript      +virtualedit
+comments        -langmap         +printer         +visual
-conceal         +libcall         -profile         +visualextra
+cryptv          +linebreak       -python          +viminfo
-cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             -rightleft       +windows
+diff            +menu            -ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
-emacs_tags      -mouseshape      -sniff           -xsmp
+eval            -mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        -mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    -xpm
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X_UNIX  -O2 -fno-strength-reduce -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L/usr/local/lib -o vim        -lm -lncurses  -liconv -framework Cocoa

Dominique Pellé

unread,
Oct 7, 2015, 6:02:47 AM10/7/15
to vim/vim

Your are using a shell (bash) command to source .vimrc.
That does not make sense.
Bash source command it to source bash scripts, not vim scripts.
You need to use Vim Ex command :source to source your ~/.vimrc. In vim, just type:

:so ~/.vimrc

vyp

unread,
Oct 7, 2015, 6:03:00 AM10/7/15
to vim/vim

To reproduce, do

source ~/.vimrc

@tienthanh8490 The :source ex command in vim is not the same as the source bash/zsh built-in. Are you running the source ~/.vimrc command somewhere in a terminal? Because that will not work. The source command in a terminal is for sourcing shell scripts.

Christian Brabandt

unread,
Oct 7, 2015, 6:06:03 AM10/7/15
to vim/vim

Do not source the .vimrc in your shell.
closing as invalid

Christian Brabandt

unread,
Oct 7, 2015, 6:06:59 AM10/7/15
to vim/vim

Closed #441.

Tony Mechelynck

unread,
Oct 7, 2015, 7:24:45 AM10/7/15
to vim_dev, reply+00b1d198ae9f7949f83d288a2eb4e1a8cbe032c...@reply.github.com
On Wed, Oct 7, 2015 at 8:30 AM, Nguyen Tien Thanh <vim-dev...@256bit.org> wrote:

@Tanjoodo The two lines above are my .vimrc file . To reproduce, do

source ~/.vimrc

Actually it happens with any .vimrc that has a comment line.

Normally, Vim itself will source the ~/.vimrc at startup (so you don't need to source it explicitly); but as others said, the vimrc is a vim script, not a bash or zsh script.

To start Vim from the shell, just use

    vim

or (if some GUI such as X11 or Windows or … is running)

    gvim

in both cases with possible arguments, for instance

    gvim +123 filename.ext

to start gvim with the cursor at line 123 of file "filename.ext"

If you have set the appropriate symlinks, other names are possible, for instance

    gvimdiff file1.c file2.c

to start gvim in diff mode on the C sources file1.c and file2.c; or

    view /usr/local/share/vim/vim74/syntax/vim.vim

(on Unix, Linux, etc. with a default install after an own-compile) to view the Vim 7.4 syntax script for Vim script in read-only mode


See :help starting.txt


Best regards,
Tony.

Nguyen Tien Thanh

unread,
Oct 7, 2015, 9:09:58 PM10/7/15
to vim/vim, vim-dev ML

Understand now. Thanks all for your help :)

Jude

unread,
Dec 18, 2020, 12:58:21 AM12/18/20
to vim/vim, vim-dev ML, Comment

This thread saved my time.😁


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

Big-ol-Bob

unread,
Oct 10, 2022, 1:02:56 AM10/10/22
to vim/vim, vim-dev ML, Comment

Saved my time as well


Reply to this email directly, view it on GitHub.
You are receiving this because you commented.Message ID: <vim/vim/issues/441/1272789321@github.com>

Reply all
Reply to author
Forward
0 new messages