Can't run nerdtree and lightline on MacOS Catalina using macvim 8.2.319

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't run nerdtree and lightline on MacOS Catalina using macvim 8.2.319

James Dekker
Am using macvim 8.2.319 (installed it by running the downloaded dmg file) on macOS Catalina (10.15.4).

My .gvimrc file:

set guifont=JetBrains\ Mono:h15
set nu!

call plug#begin('~/.vim/plugged')
Plug 'itchyny/lightline.vim'
Plug 'preservim/nerdtree'
call plug#end()

map <C-t> :NERDTreeToggle<CR>

My When I try to load it using either:

. .gvimrc 

or 

source .gvimrc

It outputs the following error:

-bash: .gvimrc: line 4: syntax error near unexpected token `('
-bash: .gvimrc: line 4: `call plug#begin('~/.vim/plugged')'

When I run macvim by doing this:

gvim Hello.py

The line numbers are set but I can't see liteline anywhere (I did do a PlugInstall and PlugUpdate).

When I try to open NERD tree by clicking on Control-t, it states this:

E492: Not an editor command: NERDTreeToggle

By, the way, I don't have a .vimrc file created... 

Why are the NERDTree and liteline plug-ins not working on macvim?

--
--
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_mac/caf3a56d-c658-4bd7-ac28-02dcb346db58%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Can't run nerdtree and lightline on MacOS Catalina using macvim 8.2.319

Yee Cheng Chin-2
Hmm, there are a lot of things going on here. First of all, do you have vim-plug actually installed? Does it work in terminal Vim? You probably want to put the plug initializations in your vimrc instead of gvimrc. gvimrc should only be for GUI specific options.

Also, gvimrc is loaded automatically by MacVim (or any gVim). You shouldn't need to load it in manually.

I'm not sure why you are getting a syntax error though. My guess is there are some whitespace / newline issues, but it's hard to tell unless you attach a file (you probably want to file an issue at https://github.com/macvim-dev/macvim/issues instead).

On Wed, Apr 8, 2020 at 5:35 PM James Dekker <[hidden email]> wrote:
Am using macvim 8.2.319 (installed it by running the downloaded dmg file) on macOS Catalina (10.15.4).

My .gvimrc file:

set guifont=JetBrains\ Mono:h15
set nu!

call plug#begin('~/.vim/plugged')
Plug 'itchyny/lightline.vim'
Plug 'preservim/nerdtree'
call plug#end()

map <C-t> :NERDTreeToggle<CR>

My When I try to load it using either:

. .gvimrc 

or 

source .gvimrc

It outputs the following error:

-bash: .gvimrc: line 4: syntax error near unexpected token `('
-bash: .gvimrc: line 4: `call plug#begin('~/.vim/plugged')'

When I run macvim by doing this:

gvim Hello.py

The line numbers are set but I can't see liteline anywhere (I did do a PlugInstall and PlugUpdate).

When I try to open NERD tree by clicking on Control-t, it states this:

E492: Not an editor command: NERDTreeToggle

By, the way, I don't have a .vimrc file created... 

Why are the NERDTree and liteline plug-ins not working on macvim?

--
--
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_mac/caf3a56d-c658-4bd7-ac28-02dcb346db58%40googlegroups.com.

--
--
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_mac/CAHTeOx_CU-HxRDFaGsSm7bmVkMrR25eh2o9y_iw6LrbcLe7q3w%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Can't run nerdtree and lightline on MacOS Catalina using macvim 8.2.319

Rod Hoon
Hi, James--

On Wed, Apr 8, 2020 at 5:35 PM James Dekker <[hidden email]> wrote:
My When I try to load it using either:

. .gvimrc 

or 

source .gvimrc

It outputs the following error:

-bash: .gvimrc: line 4: syntax error near unexpected token `('
-bash: .gvimrc: line 4: `call plug#begin('~/.vim/plugged')'
 
The error looks like it is caused by running ". .gvimrc" or "source .gvimrc" at the Bash command prompt.
If you want to source the gvimrc, you should probably do "source ~/.gvimrc" or "source $MYGVIMRC" at the : prompt inside Vim.

On Sun, Apr 12, 2020 at 12:31 AM Yee Cheng Chin <[hidden email]> advised:
You probably want to put the plug initializations in your vimrc instead of gvimrc. gvimrc should only be for GUI specific options.
 
I'm not a Vim expert, so this is a guess: Putting the plug initialization in vimrc  may help, because vimrc and gvimrc are run at different points in the startup process.

--
--
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_mac/CAOZ8HpOzE6YJQXWC6SCXKMckVxT8x4FeoPt2TBSWsOUk42Deuw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Can't run nerdtree and lightline on MacOS Catalina using macvim 8.2.319

James Dekker
Thank you, Yee Cheng Chin!

Yes, putting the same contents inside ~./vimrc worked:

set nu
set ruler
set rulerformat=%l\:%c  
set autoindent
syntax on
set nocompatible
set t_Co=256
set tabstop=4
set laststatus=2
set encoding=utf-8    

if has("gui_running")
  if has("gui_gtk2")
    set guifont=Inconsolata\ 12
  elseif has("gui_macvim")
    set guifont=JetBrains\ Mono\ Regular:h14
  elseif has("gui_win32")
    set guifont=Consolas:h11:cANSI
  endif
endif

colorscheme pencil

set background=light
let g:airline_theme = 'pencil'

call plug#begin('~/.vim/plugged')
Plug 'itchyny/lightline.vim'
Plug 'preservim/nerdtree'
call plug#end()


map <C-t> :NERDTreeToggle<CR>

On Sun, Apr 12, 2020 at 9:15 AM Rod Hoon <[hidden email]> wrote:
Hi, James--

On Wed, Apr 8, 2020 at 5:35 PM James Dekker <[hidden email]> wrote:
My When I try to load it using either:

. .gvimrc 

or 

source .gvimrc

It outputs the following error:

-bash: .gvimrc: line 4: syntax error near unexpected token `('
-bash: .gvimrc: line 4: `call plug#begin('~/.vim/plugged')'
 
The error looks like it is caused by running ". .gvimrc" or "source .gvimrc" at the Bash command prompt.
If you want to source the gvimrc, you should probably do "source ~/.gvimrc" or "source $MYGVIMRC" at the : prompt inside Vim.

On Sun, Apr 12, 2020 at 12:31 AM Yee Cheng Chin <[hidden email]> advised:
You probably want to put the plug initializations in your vimrc instead of gvimrc. gvimrc should only be for GUI specific options.
 
I'm not a Vim expert, so this is a guess: Putting the plug initialization in vimrc  may help, because vimrc and gvimrc are run at different points in the startup process.

--
--
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_mac/CAOZ8HpOzE6YJQXWC6SCXKMckVxT8x4FeoPt2TBSWsOUk42Deuw%40mail.gmail.com.

--
--
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_mac/CAJqr9zjp0Dk8XhMSb6oiRto1Jqp_MUha5GzqoEAj0GV%2BzSS3ZA%40mail.gmail.com.