Isiphelo sangoLwesihlanu: Ukucinga ngeVim [Ezinye iingcebiso]

Uxolo ngempazamo zopelo zeGif ndibhale ngokukhawuleza okukhulu

Esi sithuba sipapashiwe kwiforum kwiinyanga ezimbalwa ezidlulileyo, ndicinga ukuba lixesha lokuba ndiye kwibhlog, amathandabuzo, amagqabantshintshi, yonke into inokwenziwa kwizimvo, nceda SUKUVUTHA Ukuba awuyithandi iVim, vele urhoxe kwiposti 🙂

Ndiza kutsiba indawo esisiseko kuba iya kuba banzi kakhulu ukuba uyafuna okanye unomdla wokuyifunda, ndincoma ukuba ubaleke kwisiphelo sendlela

$ vimtutor

Ngoku ewe, ngaphandle kokunye siqala 😀

IiMacros kwiVIM

Isenokungabi yenye yezimfihlakalo ezinkulu ze-vim kodwa kulungile ukwazi ukuba i-vim inenkxaso yemacro kunokwenzeka ukugcina ii-macros ezivela a la z ; ukuqala ukurekhoda kufuneka ucofe kuphela q+ileta ukuyeka ukurekhoda sicinezela q kwaye ukubiza i-macro kuyinto efana nayo inani+@+ileta.

Kuphi:
ileta: Sisitshixo se a la z.
inani: Linani lamaxesha esiya kuphinda isenzo.

Oku kuyakwenza lula imisebenzi emininzi ephindaphindwayo. Umzekelo; Masithi sinemigca:

omnye umzekelo omnye umzekelo mibini mibini mithathu mithathu isine isine mahlanu umzekelo isihlanu

Sifuna ukuyinika le fomathi:

'enye': 'umzekelo' 'omnye'; 'ezimbini': 'umzekelo' 'ezimbini'; 'ezintathu': 'umzekelo' 'ezintathu'; 'zine': 'umzekelo' 'zine'; 'ezintlanu': 'umzekelo' 'ezintlanu';

Kulapho ii-macros zenza yonke into ibe lula kuthi 🙂

VI

 

Ulandelelwano olusetyenzisiweyo:

qa I '[Esc] ea': [Esc] wi '[Esc] ea' [Esc] wi '[Esc] A'; [Esc] 0j q

Emva koko beka isikhombisi kwilayini ukuze utshintshe kwaye usebenzise inani+@+ileta kule meko bendiyisebenzisa 4+@+a

Buyisela

Isixhobo esibaluleke kakhulu kwiVim kukuthatha indawo yoku sizibeka kwiVim yesiqhelo ngokucinezela Esc kamva siyacinezela : kwaye sibhala umyalelo Nditsho ukuyalela kuba ayikhawulelwanga endaweni. Ifana kakhulu ne RegEx
Imizekelo:

Eyona ixhaphakileyo ukutshintsha umtya wabalinganiswa kulo lonke uxwebhu:

Indawo yesiphelo 2

Myalelo:

% s / vim / Vim / g

Faka endaweni yayo yonke imigca ye-vim nguVim Qaphela: ukuba andinalo uphawu % Ndiza kukhangela kuphela umgca okhoyo

Faka endaweni yoluhlu oluthile apha phakathi kwemigca 3,5:

Indawo yesiphelo 3

Myalelo:

I-3,5s / Vim / VIM / g

Ukusuka kwimigca yesi-3 ukuya kweyesi-5 endaweni yeVim ngeVIM

Nantsi Qaphela ukuba akukho g ekugqibeleni ihlela kuphela igama lokuqala elingqinelanayo

Indawo yesiphelo 4

Myalelo:

Ii-3,5s / iVim / iVIM

Ngalo mgca siphelisa yonke imigca equlathe #

Indawo yesiphelo 5

Myalelo:

:, $ g / # / d

yomgca wangoku . kude kube sekupheleni koxwebhu $ jonga amanani # kwaye uzicime d

Nanku umyalelo uhlela icandelo lefayile

Indawo yesiphelo 6

Myalelo:

: 3, $ uhlobo

Ukusuka kumgca 3 ukuya ekupheleni koxwebhu iyalele

Eminye iMiyalelo

Nantsi inkohliso kumyalelo :r ukufunda lento iyenzayo njengoko igama layo lisitsho hahaha funda, ungongeza isicatshulwa solunye uxwebhu, kodwa kulo mzekelo sidibanisa isalathi ! ukuba ngokwahlukeneyo kukwenza, kunokwenzeka ukwenza iscript esivela kwi-vim efanayo ukulungisa ingxaki okanye nantoni na onokucinga ngayo apha ngumzekelo:

Indawo yesiphelo 7
Myalelo ngokulandelelana kokubonakala:

#Umhla :: r! Umhla #Umhla ngefomathi :: r! Umhla +%% D # Uluhlu lwezikhombisi :: r! Ls Amaxwebhu

Ndisebenzisa imiyalelo eqhelekileyo kodwa i-vim ithatha imveliso yawo nawuphi na umyalelo kwaye uyifaka njengombhalo kuxwebhu.

Kwaye le yinxalenye encinci, kusekho okungakumbi ... Kwaye izinto endingazaziyo hahahaha.

Ukhetho

Okokugqibela kodwa kungaphelelanga apho yimeko yokubonakalayo apho sinokukhetha khona imigca yokuyisebenzisa ngokulula. Zintathu iintlobo zokhetho olubonakalayo.

v Ukubonwa ngabalinganiswa
V Ukubonwa yimigca
ulawulo+v Ukubonwa ngeebhloko

Khetha okungaphakathi kubazali:
v% Ukuba usekuqaleni / esiphelweni somzali
vib Ukuba ungaphakathi kubazali

Indawo yesiphelo 8

Khetha okungaphakathi ngaphakathi okanye iikowuti ezizodwa:
vi' Khetha iikowuti ezizodwa
vi" Khetha iikowuti eziphindiweyo

Indawo yesiphelo 9

viB Khetha yonke into engaphakathi kwezitshixo

Indawo yesiphelo 10

Ukhetho ngomgca

ggVG Khetha lonke uxwebhu

Indawo yesiphelo 11

Nantsi ngokusisiseko i-gg iya kuqala; faka isikhethi esibonakalayo V; kwaye uye esiphelweni G.

Ukukhethwa kwebhloko

ulawulo+v

Indawo yesiphelo 12

[control] v e5j C [bhala isicatshulwa] [esc] [esc]

Kwaye koku ungena kwisikhethi esibonakalayo ngeebhloko ulawulov, Ndiqhubela phambili esiphelweni segama, kunye nemigca emi-5 ezantsi u-5j, ndiyalicima igama ngo-C ndibhala isicatshulwa ukuze silitshintshe kwaye ndicinezele Esc Esc.

Enye enye iyafana kodwa endaweni ye- c yinto efana nokucima kwaye ungene kwimowudi yokufaka ndisebenzise i ingena kwimowudi yokufaka apho indawo yesikhombisi ikhoyo.

Yonke le nto ndiyichazayo inokubonakala ingaqondakali okanye into enje nge vim ninja hahaha kodwa ayisiyonto engekhoyo kwi-vim manual IVim inelinye lamaxwebhu endiwaziyo ukufaka amaxwebhu ungene nje

: Nceda

ukuba ufuna into ethile

: uncedo: w

Oku kuya kukusa ngqo kwicandelo elithetha ngo: w umgadi.

Ngoku ukuba ... Bonwabile abantu beVim. 😀


Umxholo wenqaku uyabambelela kwimigaqo yethu imigaqo yokuziphatha yokuhlela. Ukuxela impazamo cofa apha.

Izimvo ezi-18, shiya ezakho

Shiya uluvo lwakho

Idilesi yakho ye email aziyi kupapashwa. ezidingekayo ziphawulwe *

*

*

  1. Uxanduva lwedatha: UMiguel Ángel Gatón
  2. Injongo yedatha: Ulawulo lwe-SPAM, ulawulo lwezimvo.
  3. Umthetho: Imvume yakho
  4. Unxibelelwano lwedatha: Idatha ayizukuhanjiswa kubantu besithathu ngaphandle koxanduva lomthetho.
  5. Ukugcinwa kweenkcukacha
  6. Amalungelo: Ngalo naliphi na ixesha unganciphisa, uphinde uphinde ucime ulwazi lwakho.

  1.   UNodetino sitsho

    Ndicinga ukuba ndiza kuqala ukusebenzisa iVim 🙂

  2.   URodrigo Bravo sitsho

    Inqaku elisemagqabini enkosi ngokwabelana. Bendingazi ngokukhetha ibhloko. Masinwabe!

  3.   IBlueSkull sitsho

    I-Emacs ..., ndicinga ukuba kukho umntu ekufuneka eyithethile, ke kutheni ulinde ngaphezulu: D, hayi, ayisosiqalo seLangatye, phakathi kwe-Emacs kunye neVim akunakubakho ngxoxo: D, kucacile ukuba yeyiphi ephezulu, kwaye hayi, akukho e Vim;).

    1.    Bla bla bla sitsho

      Ewe sisiqalo sedangatye. Zilumkele ezo ntlobo zezimvo kuba azinanjongo. Ukongeza, ayifaki igalelo kwinto eli nqaku elithetha ngayo. Imibuliso.

    2.    Zironide sitsho

      emacs! emacs! emacs! 😀

    3.    Martin sitsho

      Ii-emacs zoluntu!
      «[…] Ndicinga ukuba kukho umntu ekufuneka eyithethile […]» Hahaha, +1!

      Nxiba ngathi injalo, kuza umntu odlala into engaqhelekanga kwaye athi «izikhombisi ngeentolo? IWASD? Hayi hayi, ndiza kukubonisa indlela, yi-hjkl »kwaye zininzi ezikhanyisiweyo ngasemva>: D

      @Blablabla: kulungile apho, isiqhu sakho siphila ngokuncokola!

    4.    Umngcipheko sitsho

      Uvavanyo olwenziweyo lokubona abafundi bakhetha ukungonzakalisi.

  4.   mzzisezi sitsho

    Kakhulu! I-Vim ngowona mhleli wokubhaliweyo ubalaseleyo. Ngethemba lokupapasha rhoqo kule ndawo malunga nomshicileli othethiweyo. Imibuliso.

  5.   Jorge sitsho

    Ndihlala ndinengxaki yokuqonda ii-macros kwiVim, apho ngexesha elincinci ndiza kuyinika spin spin

    Qaphela: Abasebenzisi be KDE, sebenzisa Vim-QT 😀

    Enkosi 😀

  6.   Eliotime3000 sitsho

    Okokugqibela, iGlass Mini yam iya kuba nesizathu esinye sokuphila: andinayo i-EMACS, kodwa ndineVIM.

    Ndiza kuthatha iingcebiso zakho.

  7.   Kuk sitsho

    Ulwazi olulungileyo enkosi

  8.   ULito sitsho

    yabelana nge-vimrc yakho iyaqondakala ngokubonakalayo iyonwabisa :) !!! Ndiyathemba ukuba uza kwabelana nam :)!

    1.    Wada sitsho

      Ewe ndiza 😀 mandilungiselele iposti

  9.   img91m sitsho

    Wow ijongeka intle kakhulu :)! haha ndiza kuqala ukuziqhelanisa ngakumbi, kwaye i-vimrc yakho ijongeka intle kakhulu Oo! Ndiyathemba ukuba wabelana ngayo nceda;)!

    1.    Wada sitsho

      Ngapha koko ayisiyo vimrc kangako, kodwa ndiza kuchaza ukuba ndiyenzile hahaha

      1.    img91m sitsho

        haha ngcono kakhulu :)! ke sonke siyafunda haha ​​enkosi :)! 😉

  10.   tesla sitsho

    Ingcebiso elungileyo kakhulu Wada. Inyani yile yokuba iimfuno zam zenkqubo zisisiseko kwaye mhlawumbi yiyo loo nto ndingazange ndibone amandla eVim. Nangona kunjalo, le nto uyithethayo ibonakala inomdla kum. Ndiza kuzama ukuyisebenzisa xa kufuneka ndenze into.

    Ndiyabonga!

  11.   UJonathan Leonel Gasparrini sitsho

    Iposti entle kakhulu! Nangona besele ndizazi ezi ngcebiso zichazwe kakuhle kwabo bangazaziyo!
    Uncedo oluncinci lwabasebenzisi abatsha, «vimtutor» ikwisiNgesi, kwabo bafuna uqeqesho ngeSpanish, chwetheza nje «vimtutor es».

    Ndiyayithanda i-vim, ubomi bam buya kwahluka ngokupheleleyo ngaphandle kwakhe!
    Kudala ndiyisebenzisa iminyaka emi-2 kwaye yonke imihla ndiyamangaliswa =)

    Phendula nge quote

    P / D: Nabani na ofuna ukubona umzekelo woqwalaselo lwe .vimrc, ndiyakumema ukuba ubone owam! =) https://github.com/jlgasparrini/dotvimrc