Sintaxe Realce do editor vi [duplicado]

2

Como ativar recursos de destaque de sintaxe no editor vi? Atualmente estou usando o Ubuntu 16.10.

Aqui está a saída de vi --version .

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 24 2016 22:32:42)
Included patches: 1-1829
Extra patches: 8.0.0056
Modified by [email protected]
Compiled by [email protected]
Small version without GUI.  Features included (+) or not (-):
+acl             -farsi           -mouse_sgr       -tag_any_white
-arabic          -file_in_path    -mouse_sysmouse  -tcl
-autocmd         -find_in_path    -mouse_urxvt     -termguicolors
-balloon_eval    -float           -mouse_xterm     +terminfo
-browse          -folding         +multi_byte      -termresponse
+builtin_terms   -footer          -multi_lang      -textobjects
-byte_offset     +fork()          -mzscheme        -timers
-channel         -gettext         -netbeans_intg   -title
-cindent         -hangul_input    +packages        -toolbar
-clientserver    +iconv           -path_extra      -user_commands
-clipboard       -insert_expand   -perl            +vertsplit
-cmdline_compl   -job             -persistent_undo -virtualedit
+cmdline_hist    +jumplist        -printer         +visual
-cmdline_info    -keymap          -profile         -visualextra
-comments        -langmap         -python          -viminfo
-conceal         -libcall         -python3         -vreplace
-cryptv          -linebreak       -quickfix        +wildignore
-cscope          -lispindent      -reltime         -wildmenu
-cursorbind      -listcmds        -rightleft       +windows
-cursorshape     -localmap        -ruby            +writebackup
-dialog          -lua             -scrollbind      -X11
-diff            -menu            -signs           +xfontset
-digraphs        -mksession       -smartindent     -xim
-dnd             -modify_fname    -startuptime     -xsmp
-ebcdic          -mouse           -statusline      -xterm_clipboard
-emacs_tags      -mouse_dec       -sun_workshop    -xterm_save
-eval            -mouse_gpm       -syntax          -xpm
+ex_extra        -mouse_jsbterm   -tag_binary      
-extra_search    -mouse_netterm   -tag_old_static  
   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/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -Wdate-time  -g -O2 -fdebug-prefix-map=/build/vim-vY1bx1/vim-7.4.1829=. -fPIE -fstack-protector-strong -Wformat -Werror=format-security -DTINY_VIMRC -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: gcc   -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim    -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo  -lselinux -lacl -lattr -ldl 

Eu tentei :syntax on . Abaixo está a mensagem de erro de :syntax on

E319: Sorry, the command is not available in this version
    
por Kaushal 21.02.2017 / 04:35

1 resposta

6

Como Muru ressalta, parece que você está usando o pacote vim-tiny . Um Vim mais funcional sem uma GUI pode ser encontrado em:

  • o pacote vim , com o qual você não pode criar scripts do próprio Vim com linguagens de script externas
  • o pacote vim-nox , com o qual você pode criar scripts do próprio Vim com linguagens de script externas

Para instalar um, use:

sudo apt install vim

Ou:

sudo apt install vim-nox
    
por Chai T. Rex 21.02.2017 / 04:59