2

I installed Plugin terminal using the vim-terminal plugin and try to execute :TerminalSplit bash but before the terminal open I got a warning message.

Python 2 interface is not installed, using Python 3 instead
Warning: Global CursorHoldI and CursorMovedI autocommands may cause Terminal to run slowly
Press ENTER or type command to continue

after I clicked ENTER, the terminal will appear but it does not give any response when I type any command. Can someone help me with this? here is my init.vim. I confuse where is the problem

:set number
:set autoindent
:set tabstop=4
:set shiftwidth=4
:set smarttab
:set softtabstop=4
:set mouse=a

call plug#begin()

Plug 'http://github.com/tpope/vim-surround' " Surrounding ysw)
Plug 'https://github.com/preservim/nerdtree' " NerdTree
Plug 'https://github.com/tpope/vim-commentary' " For Commenting gcc & gc
Plug 'https://github.com/vim-airline/vim-airline' " Status bar
Plug 'https://github.com/rafi/awesome-vim-colorschemes' " Retro Scheme
Plug 'https://github.com/ryanoasis/vim-devicons' " Developer Icons
Plug 'https://github.com/terryma/vim-multiple-cursors' " CTRL + N for multiple cursors
Plug 'https://github.com/preservim/tagbar' " Tagbar for code navigation
Plug 'vim-airline/vim-airline-themes'
Plug 'https://github.com/nvim-lua/plenary.nvim'
Plug 'https://github.com/nvim-telescope/telescope.nvim', { 'tag': '0.1.1' }
Plug 'https://github.com/xiyaowong/nvim-transparent'
Plug 'https://github.com/tc50cal/vim-terminal'

set encoding=UTF-8
call plug#end()

nmap <F8> :TagbarToggle<CR>

:colorscheme jellybeans


nnoremap <C-f> :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
noremap <C-b> :TerminalSplit bash<CR>
noremap <C-v> :TerminalVSplit bash<CR>
noremap <C-n> :TerminalTab bash<CR>

let g:NERDTreeDirArrowExpandable="+"
let g:NERDTreeDirArrowCollapsible="~"

" air-line
let g:airline_powerline_fonts = 1

if !exists('g:airline_symbols')
    let g:airline_symbols = {}
endif

" unicode symbols
let g:airline_left_sep = '»'
let g:airline_left_sep = '▶'
let g:airline_right_sep = '«'
let g:airline_right_sep = '◀'
let g:airline_symbols.linenr = '␊'
let g:airline_symbols.linenr = '␤'
let g:airline_symbols.linenr = '¶'
let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ'
let g:airline_symbols.paste = '∥'
let g:airline_symbols.whitespace = 'Ξ'

" airline symbols
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''
let g:airline_symbols.linenr = ''

let g:airline#extensions#tabline#enabled = 1

"Create a funtion to get the sections contents, name is irrelevant
function! GetSectionContents()
  " Will be refreshed often
  return 'hello world'
endfunction

"Create vim-airline part
call airline#parts#define_function('func','GetSectionContent')

"Replace section y with output of parts function
let g:airline_section_y = airline#section#create_right(['','func'])

let g:airline#extensions#default#layout = [
    \ [ 'a', 'b', 'c' ],
    \ [ 'x', 'z', 'error', 'warning', 'y' ]
    \ ]

" Find files using Telescope command-line sugar.
nnoremap <leader>ff <cmd>Telescope find_files<cr>
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
nnoremap <leader>fb <cmd>Telescope buffers<cr>
nnoremap <leader>fh <cmd>Telescope help_tags<cr>

let g:transparent_enabled = v:true

and here is whats inside my /usr/bin/python..

fhadli@fhadli-GF63-Thin-9RCX:~$ ls -la /usr/bin/python
python              python2.7           python2-config      python3.8           python3-config      python3-pasteurize  python-config       
python2             python2.7-config    python3             python3.8-config    python3-futurize    python3-wsdump 

after i add lue require("toogleterm").setup() in my ~/.config/nvim.init.vim i got this error

Error detected while processing /home/fhadli/.config/nvim/init.vim:
line    1:
E5108: Error executing lua [string ":lua"]:1: module 'toggleterm' not found:
        no field package.preload['toggleterm']
        no file './toggleterm.lua'
        no file '/usr/share/luajit-2.1.0-beta3/toggleterm.lua'
        no file '/usr/local/share/lua/5.1/toggleterm.lua'
        no file '/usr/local/share/lua/5.1/toggleterm/init.lua'
        no file '/usr/share/lua/5.1/toggleterm.lua'
        no file '/usr/share/lua/5.1/toggleterm/init.lua'
        no file './toggleterm.so'
        no file '/usr/local/lib/lua/5.1/toggleterm.so'
        no file '/usr/lib/x86_64-linux-gnu/lua/5.1/toggleterm.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        [string ":lua"]:1: in main chunk
7
  • Which version of Vim are you using? What is the output of :vim version? Jan 31 at 6:07
  • 1
    Unless you need a plugin for a specific purpose, I would stick with :terminal
    – D. Ben Knoble
    Jan 31 at 15:07
  • @VivianDeSmedt i'm sorry, i'm using nvim v0.8.2 Feb 1 at 23:18
  • Could you tell us what is the result of the following vim commands: :has('python'), :has('python3')? Feb 2 at 8:21
  • @VivianDeSmedt this is the result E492: Not an editor command: :has('python') and E492: Not an editor command: :has('python3') Feb 3 at 0:25

1 Answer 1

0

It seems like that the plugin is very old and isn't probably up to date anymore. Since you're using neovim I'd recommend to pick one of the terminal-plugins from this list. You could give toggleterm a try for example.

7
  • I have tried to install toogle term using VimPlug but it does not work. it there any different if we install using VimPlug dan Packer? Jan 31 at 1:34
  • What do you mean with "it does not work"? There shouldn't be a difference if you either use VimPlug or Packer. They just have different features but should do the same.
    – TornaxO7
    Jan 31 at 12:20
  • after i execute PlugInstall the message shows that i have installed toggleterm. but when I open nvim again and type ToogleTerm size=12 it gave an error E492: Not an editor command: ToggleTerm size=12 Feb 1 at 23:17
  • Do you have lua require("toggleterm").setup() anywhere in your vimscript file? Because without it, toggleterm will not be prepared for your vim session.
    – TornaxO7
    Feb 2 at 11:34
  • no i dont have it. should i put in inside .config/nvim/init.vim? Feb 3 at 0:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.