Vundle, sarrafa plugins a cikin Vim yadda yakamata

Game da Vim Vundle

A talifi na gaba zamu kalli Vundle. A yau, duk da duk masu gyara a cikin duniya, babu shakka Vim ɗayan mahimman kayan aiki da kayan aiki don yi amfani da fayilolin rubutu, sarrafa fayilolin daidaita tsarin da lambar rubutu. Mafi yawan baƙin cikin yawancin masu amfani waɗanda suka ƙi wannan editan. Ayyukan Vim za a iya faɗaɗa su zuwa matakai daban-daban ta amfani da plugins, kuma za mu iya sarrafa su ta hanyar Vundle.

Wannan kayan aikin ne mai matukar amfani sarrafa Vim plugins. Vundle ya kirkiro itace na musamman don kowane plugin da muka girka da kuma adana ƙarin fayilolin sanyi a cikin kundin adireshin mai dacewa. A takaice, zai bamu damar girka sabbin abubuwa, daidaita wadanda suke, sabunta su, bincika abubuwan da aka girka da kuma tsabtace abubuwan da ba a amfani da su. Duk ayyukan za'a iya aiwatar dasu tare da maɓallin keystroke guda ɗaya tare da ma'amala.

Sanya Vundle

Idan kuna buƙatar Vundle, kuyi tunanin hakan kun riga kun girke vim akan tsarin ku. Idan kuwa ba haka ba, shigar vim da git (don sauke tarin). Kuna iya amfani da umarni mai zuwa don shigar da waɗannan fakitin akan tsarin tushen Debian:

sudo apt-get install vim git

Zazzage Vundle

Za mu je clone Vundle mangaza:

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

Sanya Vundle

Don gaya wa vim don amfani da sabon manajan plugin, muna buƙatar ƙirƙirar fayil ɗin ~ / .vimrc.

vim ~/.vimrc

Sanya layuka masu zuwa a saman wannan fayil ɗin:

set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line

Lines da aka yiwa alama "ana buƙata" sune bukatun Vundle. Sauran layukan misalai ne kawai, waɗanda zamu iya kawar da su idan muna so. Da zarar mun gama, zamu adana fayil ɗin tare da : wq.

Yanzu zamu iya buɗe vim:

vim

Sanya kari

Don shigar da ƙari za mu rubuta a cikin editan:

Vim vundle bude plugininstall

:PluginInstall

Wani sabon taga zai bude raba tare da duka abubuwan da muka ƙara a cikin fayil .vimrc, wanda za'a shigar dashi ta atomatik.

vundle vim plugin shigar

Lokacin da kafuwa ya cika, dole ne mu share ma'ajin ajiya buga umarnin mai zuwa:

:bdelete

Hakanan zamu iya shigar da plugins ba tare da buɗe vim ba. Dole ne kawai kuyi amfani da wannan umarnin daga tashar:

vim +PluginInstall +qall

Sarrafa abubuwan haɗin Vim tare da Vundle

Newara sabon plugins

Na farko, nemi akwai add-kan amfani da umarni:

Binciken vim vundle plugin

:PluginSearch

para - sabunta jerin gida daga shafin yanar gizo, "ara "!" a karshen:

:PluginSearch!

Wani sabon taga zai tsage wanda zai nuna duk wasu samfuran da ake dasu.

Hakanan zamu iya saka ainihin sunan kayan aikin Me muke nema:

:PluginSearch vim-dasm

Don shigar da plugin, matsar da siginan layin zuwa layin da yake sha'awa kuma latsa «i». Wannan zai shigar da zaɓin da aka zaɓa.

Vim vundle dasm an shigar

Hakanan, girka duk add-kan da kake son samu akan tsarin ka. Da zarar an shigar, cire Vundle buffer cache amfani da umarni:

:bdelete

Don yin aikin atomatik don cin nasara, dole ne mu ƙara sunan abubuwan da aka sanya a cikin fayil ɗin .vimrc. Don yin wannan, rubuta a ciki vim:

:e ~/.vimrc

A cikin fayil ɗin ƙara:

Plugin 'vim-dasm'

Sauya vim-dasm tare da sunan kowane abin talla. Yanzu latsa maɓallin ESC kuma a buga: wq don ajiye canje-canje da rufe fayil ɗin.

Lura cewa duk plugins ɗinku dole ne a ƙara su kafin layi mai zuwa a cikin fayil .vimrc:

filetype plugin indent on

Jerin abubuwan da aka saka

vim jerin vundle plugins

para lissafa abubuwan da aka saka, rubuta daga vim edita:

:PluginList

Sabunta plugins

para sabunta dukkan abubuwanda aka girkarubuta:

:PluginUpdate

Sake shigar da plugins

para sake shigar da dukkan pluginsrubuta:

:PluginInstall!

Uninstall add-kan

Na farko, ya lissafa duk abubuwan da aka sanya:

:PluginList

Yanzu sanya siginan kwamfuta akan madaidaicin layin, kuma latsa SHITF + d:

:e ~/.vimrc

Sannan shirya fayil din .vimrc kuma cire shigarwar da aka kara wanda ke nuni da kayan aikin. Rubuta : wq don adana canje-canje kuma fita daga edita.

Taimako

taimako mara kyau

Wannan shi ne ƙarshen dutsen kankara, zamu iya samun ƙarin bayani game da amfani da Vundle a cikin ku Shafin GitHub. Don ƙarin cikakkun bayanai zamu iya tuntuɓar sashen taimako ta hanyar buga abubuwa masu zuwa a cikin editan vim:

:h vundle

Bar tsokaci

Your email address ba za a buga. Bukata filayen suna alama da *

*

*

  1. Wanda ke da alhakin bayanan: Miguel Ángel Gatón
  2. Manufar bayanan: Sarrafa SPAM, sarrafa sharhi.
  3. Halacci: Yarda da yarda
  4. Sadarwar bayanan: Ba za a sanar da wasu bayanan ga wasu kamfanoni ba sai ta hanyar wajibcin doka.
  5. Ajiye bayanai: Bayanin yanar gizo wanda Occentus Networks (EU) suka dauki nauyi
  6. Hakkoki: A kowane lokaci zaka iyakance, dawo da share bayanan ka.

      henryk m

    Na gode sosai ga shafin da yawa sun yi kadan da miliyan da yawa ... Na koyi abubuwa da yawa game da vim
    gaisuwa daga Warsaw.