Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
added 4 characters in body
Source Link
Dom
  • 3.4k
  • 5
  • 21
  • 39

I was trying to configure vim to have a file explorer on the side with no plugins. I found the following script:

function! ToggleNetrw()
  if g:NetrwIsOpen
    let i = bufnr("$")
    while (i >= 1)
        if(getbufvar(i,"&filetype") == "netrw")
            silent exe "bwipeout " . i
        endif
        let i-=1
    endwhile
    let g:NetrwIsOpen=0
 else
    let g:NetrwIsOpen=1
    silent Lexplore
 endif
endfunction

I have barely written any vimrc code so i'mI'm not 100% sure what this function does, but from my understanding this should open Netrw if it isn't already open and do nothing if it is.

However i'mI'm getting the following error message when the vimrc folder is re-initialized: Not an editor command :Lexplore

Not an editor command :Lexplore

Does this have something to do with my vim version, my linux distro (which is CentOS) or something else?

I was trying to configure vim to have a file explorer on the side with no plugins. I found the following script:

function! ToggleNetrw()
  if g:NetrwIsOpen
    let i = bufnr("$")
    while (i >= 1)
        if(getbufvar(i,"&filetype") == "netrw")
            silent exe "bwipeout " . i
        endif
        let i-=1
    endwhile
    let g:NetrwIsOpen=0
 else
    let g:NetrwIsOpen=1
    silent Lexplore
 endif
endfunction

I have barely written any vimrc code so i'm not 100% sure what this function does, but from my understanding this should open Netrw if it isn't already open and do nothing if it is.

However i'm getting the following error message when the vimrc folder is re-initialized: Not an editor command :Lexplore

Does this have something to do with my vim version, my linux distro (which is CentOS) or something else?

I was trying to configure vim to have a file explorer on the side with no plugins. I found the following script:

function! ToggleNetrw()
  if g:NetrwIsOpen
    let i = bufnr("$")
    while (i >= 1)
        if(getbufvar(i,"&filetype") == "netrw")
            silent exe "bwipeout " . i
        endif
        let i-=1
    endwhile
    let g:NetrwIsOpen=0
 else
    let g:NetrwIsOpen=1
    silent Lexplore
 endif
endfunction

I have barely written any vimrc code so I'm not 100% sure what this function does, but from my understanding this should open Netrw if it isn't already open and do nothing if it is.

However I'm getting the following error message when the vimrc folder is re-initialized:

Not an editor command :Lexplore

Does this have something to do with my vim version, my linux distro (which is CentOS) or something else?

Source Link

Netrw - Lexplore is not an editor command

I was trying to configure vim to have a file explorer on the side with no plugins. I found the following script:

function! ToggleNetrw()
  if g:NetrwIsOpen
    let i = bufnr("$")
    while (i >= 1)
        if(getbufvar(i,"&filetype") == "netrw")
            silent exe "bwipeout " . i
        endif
        let i-=1
    endwhile
    let g:NetrwIsOpen=0
 else
    let g:NetrwIsOpen=1
    silent Lexplore
 endif
endfunction

I have barely written any vimrc code so i'm not 100% sure what this function does, but from my understanding this should open Netrw if it isn't already open and do nothing if it is.

However i'm getting the following error message when the vimrc folder is re-initialized: Not an editor command :Lexplore

Does this have something to do with my vim version, my linux distro (which is CentOS) or something else?