VIM - Linux Slackware

Kilka porad odnośnie edytora VIM Poniżej zamieszczam kilka przydatnych informacji odnośnie edytora VIM. W zasadzie to są one przydatne głównie dla mnie a ta strona jest po to, abym niczego nie zgubił w przyszłości ;) Może jednak komuś z Was się coś przyda.

Nowe rozszerzenie w kolorowaniu składni Problem: mamy jakieś nowe rozszerzenie pliku (np.lib) i chcemy, aby pliki tego rodzaju używały kolorowania składni z wybranego języka (np.php). Znam trzy rozwiązania. W pierwszych dwóch należy najpierw znaleźć plik filetype.vim:
# locate filetype.vim
/usr/share/vim/vim63/filetype.vim
Teraz przystępujemy do edycji powyższego pliku. Pierwsza metoda:
  1. Szukamy ciągu au BufNewFile,BufRead *.php,*.php3 setf php (jeśli nie znajdziemy to szukamy po prostu php i czegoś w rodzaju owej linii)
  2. Dodajemy tutaj nasze rozszerzenie: au BufNewFile,BufRead *.php,*.php3,*.lib setf php
  3. Upewniamy się, iż nie ma konfliktów - to rozszerzenie może być przypisane do innego rodzaju pliku! Czyli szukamy ciągu lib w pliku filetype.vim, i w linijce postaci au BufNewFile,BufRead *.lib setf cobol usuwamy nasze *.lib


Metoda druga: na samym końcu pliku filetype.vim dodajemy taki wpis (zmieniając oczywiście rozszerzenia tak aby pasowały do tego co chcemy otrzymać):

" my filetype file
if exists("did_load_filetypes")
finish
endif
augroup filetypedetect
au! BufRead,BufNewFile *.lib setfiletype php
augroup END


No i ostatnia metoda (thx Frogu) - najprostsza... edytujemy bezpośrednio plik .vimrc dodając na jego końcu:

augroup filetypedetect
        au! BufRead,BufNewFile *.lib setfiletype php
augroup END
	

plik konfiguracyjny .vimrc
colorscheme elflord
highlight Comment ctermfg=darkgreen
set history=1000
set mouse-=a
:syntax enable
augroup filetypedetect
        au! BufRead,BufNewFile *.lib setfiletype php
augroup END
set nobackup
set nowritebackup

Dodaj swój komentarz
Aby dodać komentarz wystarczy podać jego treść - pozostałe pola nie są obowiązkowe. Zaznaczenie zapamiętania nicka i adresu e-mail spowoduje, iż w każdej chwili gdy wrócisz do tej strony i będziesz chciał(a) wpisać kolejny komentarz pola nick oraz e-mail zostaną automatycznie wypełnione:
 
Nick:    E-mail:

Zapamiętaj mój nick i email    Ukryj mój adres email

Wasze komentarze
 ukryj komentarze 
::ClatUnerseCet (nickonebrother@runbox.com) 2012-01-31 14:54:00
Thanks for taking the time to discuss this, I feel strongly about it
and love learning more on this topic. If possible, as you gain
expertise, would you mind updating your blog with more information? It
is extremely helpful for me.
::Pneuffins (f7zyjosh51gf@mail.ru) 2012-01-24 09:27:00
Good day!
Happy New Year!
Health, luck and love!
::NatashaHat (natashabesmp@gmail.com) 2012-01-23 10:08:00
Jak wolny X Rumer 7.0.10 Elite?
Daj mi prosze adres URL!
::NatashaHat (natashabesmp@gmail.com) 2012-01-16 23:47:00
Gdy wolne xrumer 7.0.10 ELITE?
Daj mi prosze adres URL!!!
::berigassita (insedsdrync@mymail-in.net) 2012-01-12 06:25:00
äĺňŕëčçŕöč˙ çâîíęîâ ňĺëĺ2 sim-service.su đŕńďĺ÷ŕňęŕ çâîíęîâ ěĺăŕôîí
sim-service.su đŕńďĺ÷ŕňęŕ áčëŕéí sim-service.su sim-service.su sim
service inbox ru sim-service.su sim-service@inbox.ru sim-service.su
sim-service.su sim-service.su sim service inbox ru sim-service.su
sim-service.su sim-service.su sim-service.su sim-service.su
www.sim-service.su
sim-service.su sim-service.su sim-service.su sim-service@inbox.ru
sim-service.su sim service inbox ru sim-service.su sim service inbox
ru sim-service.su sim-service.su sim-service.su sim-service@inbox.ru
sim-service.su sim-service.su sim-service.su www.sim-service.su
sim-service.su sim-service.su sim-service.su sim-service.su
sim-service.su www.sim-service.su sim-service.su sim service inbox ru
đŕńďĺ÷ŕňęŕ áčëŕéí sim-service.su äĺňŕëčçŕöč˙ çâîíęîâ ěĺăŕôîí
sim-service.su đŕńďĺ÷ŕňęŕ íŕ sim-service.su
::ClatUnerseCet (jessikasimson111@runbox.co) 2011-12-30 04:38:00
From these findings?
::dress 2012 (wanli8393@gmail.com) 2011-12-30 00:40:00
Wow, great post! Well-written, informative and eye-opening. Will
definitely be checking out your blog more in the future :)
::Unknown (Unknown@unknown.ru) 2011-12-20 12:46:00
Unknown message
::hagemailm (jessikasimson123@runbox.co) 2011-12-19 19:10:00
A very nice niche blog, and a good design there sparks Simplicity yet
complex algorithm of the internet. Thank You.
:: (wanli8393@gmail.com) 2011-12-10 05:16:00
Well,OK.I have to say,what a wonderful blog it is.thank you for your
sharing so good articles in the website.I like it very much.
::ahidudejh (scalejd8@pregnancymiraclereviewnow.org) 2011-12-02 21:15:00
<a href="">find out right now</a>
<a href="">click here with more information</a>


<a href="">get the story for real</a>
<a href="">find out on more</a>
<a href="">get the story with more
information</a>
[url= ]learn with more information[/url]
[url= ]get the 411 for more[/url]

[url= ]learn for more[/url]
[url= ]get the 411 on more[/url]
[url= ]click here right now[/url]
::Antuanettevino (antuanettevopyip@gmail.com) 2011-11-17 07:49:00
It's REAL power for internet-promo and for mass-posting!
[b]English desription of XRumer 7.08 Elite[/b]:

+ it can mass post to forums, blogs, guestbooks, CMS's, socials
+ absolutely automatically break a lot of captchas (more than 100
types of captchas, [b]included ReCaptcha![/b])
+ break more than 15.000 types of textcaptchas (such as
"1+1?", "what color of snow?", etc.)
+ autoconfirmate all links from email
+ mass register profiles on forums, edit it, upload avatars, writes
signature, etc.
+ have a lot of macroses
+ autoregistrate email accounts on GMail, Mail.ru, etc.
+ have special modes, for example Mass-PM, for sending PM's to all
forums members
+ more, and more!

For Russian users:
+ automatically mass send messages in VKontakte, Odnoklassniki
(auto-break captcha too!)

Want to post your message more than 100.000 different site all over
the world?! You can make it ONLY with XRumer 7.08 Elite!
[i](latest version was updated in November 2011)[/i]

Need more info? Just [u]google[/u] it ;)
::Antuanettevino (antuanettevopyip@gmail.com) 2011-11-12 09:12:00
Interested?
[b]English desription of XRumer 7.08 Elite[/b]:

+ it can mass post to forums, blogs, guestbooks, CMS's, socials
+ absolutely automatically break a lot of captchas (more than 100
types of captchas, [b]included ReCaptcha![/b])
+ break more than 15.000 types of textcaptchas (such as
"1+1?", "what color of snow?", etc.)
+ autoconfirmate all links from email
+ mass register profiles on forums, edit it, upload avatars, writes
signature, etc.
+ have a lot of macroses
+ autoregistrate email accounts on GMail, Mail.ru, etc.
+ have special modes, for example Mass-PM, for sending PM's to all
forums members
+ more, and more!

For Russian users:
+ automatically mass send messages in VKontakte, Odnoklassniki
(auto-break captcha too!)

Want to post your message more than 100.000 different site all over
the world?! You can make it ONLY with XRumer 7.08 Elite!
[i](latest version was updated in November 2011)[/i]

Need more info? Just [u]google[/u] it ;)
::NICKNAME2011-11-04 20:38:00
Stop hack the program!!!
::joraAbard (kosogorovaaurl494@mail.ru) 2011-11-03 19:05:00
What about the English invent football championship?
::hagemailm (hosannavernoe@runbox.com) 2011-10-09 14:44:00
Thank you! I always wanted to write in my site something like that.
Can I take part of your post to my blog?
::hagemailm (hosannavernoe@runbox.com) 2011-10-07 22:21:00
Do not quite understand what is at stake.
::hagemailm (hosannavernoe@runbox.com) 2011-10-05 01:44:00
Consent to all of you!
::hisalkdu2011-10-03 12:21:00
penile enlargement methodspenis enlargement exercises videois penis
enlargment possible[url=˙ţh]how to enlargement penis [/url]
[url=˙ţh]penis enlargement stretchers [/url]

[url=˙ţh]enlargment of penis [/url]
best penis enlargementspenies enlargementpenis enlargement fastpenis
enhancers
[url=˙ţh]penis enlargement programs [/url]

[url=˙ţh]penis enlargment bible [/url]
most effective penis enlargermens penis enlargementpenis enlargement
techniquespenile exercises

21bzensm285fq780v7dl


21bzensm285fq780v7dl
::bodudejh2011-09-18 00:15:00
4qnnlmfg11jlgwppdiaj
::hagemailm (shespippimbqwers@gmail.com) 2011-09-13 15:41:00
I do not agree ...
::b0SamueL0b (BB-X-samuel-fQf1974@hotmail.com) 2011-09-10 04:35:00
+z$8frZdyL%68pSU/:>w<:E3.lG-!XIB
::fizotik_fizot (fizot@mail.ru) 2011-09-09 15:48:00
fizot fizotik xtexcounter@bk.ru
::hagemailm (shespippimb@gmail.com) 2011-08-19 23:28:00
Very funny post...
::hagemailm (shespippimb@gmail.com) 2011-08-04 08:08:00
Hi From these findings?
::gx.mike (abdulfromae@mail333.com) 2011-06-08 15:28:00
Here’s how you can stop following the crowd, doing what everyone else
doing…Now you too can use this proven forex trading system to
consistently make profitable trades up to 95% of the time, rarely ever
hit stoploss, and finally become successful… even if you’ve never made
a buck in the market… guaranteed!

More info on forex-promo.com
::ez.tyree (abdulfromae@mail333.com) 2011-06-04 13:21:00
NOW introducing 10 pip day strategy the last forex system you’ll ever
need
The Forex Innovator trading system is inspired by classical technical
analysis, with specific entries and targets.
After years of hard work and improvements I've developed a set of
powerful entry rules which rarely ever hit the stoploss with a risk to
reward ratio of 1:1!In other words, the strategy has an extremely high
success rate. The stoploss is constantly kept tight so losses are
kept to a minimal, if they occur at all.

Come to forex-promo.com
::dolodyloaph (softaegrgion@opilon.com) 2011-06-01 09:40:00
free megaupload serial site
softaworgioh@opilon.com
::bp.chi (abdulfromae@mail333.com) 2011-06-01 05:04:00
The 10 pip day trading strategy is so astonishingly clear, there are
no guessing games and you’ll laugh at everyone else trading blind in
the market
In the 10 pip day manual you will discover the exact same strategies
that I personally use day in and day out to consistently profit in the
market.

Join forex-promo.com
::Cheburatorsr (builhuigord@gmail.com) 2011-05-19 03:20:00
Want to tell yoi..
Eeer

Dokestn mtater
::Cheburatorsr (builhuigord@gmail.com) 2011-05-14 03:09:00
Wantt ot tell yuo..
Eeer

Later
::Unknown (Unknown@unknown.ru) 2011-04-15 07:35:00
Unknown message
::pavelvolinkins2011-04-09 15:41:00
Admin, hello! here are having problems with your site. Write me. ECK
98956785664
::Pharme411 (johne612@aol.com) 2011-03-23 22:46:00
Very nice site!
::Pharmc346 (johnc510@aol.com) 2011-03-23 22:43:00
Hello! kddgeke interesting kddgeke site!
::Unknown (Unknown@unknown.ru) 2011-03-05 05:27:00
Unknown message
::marfoobre (hatcriur2elper@gmail.com) 2011-02-16 21:46:00
<a href=tehnomagija.ucoz.ru>Áĺńďëŕňíŕ˙ RPG îíëŕéí čăđŕ
Ňĺőíîěŕăč˙ çŕâîĺâŕëŕ číňĺđĺń ňűń˙÷ ďîëüçîâŕňĺëĺé đŕçëč÷íîé âîçđŕńňíîé
ęŕňĺăîđčč îđčăčíŕëüíűě číňĺđôĺéńîě, ăĺéěďëĺĺě, čăđîâűě äâčćęîě. Čăđŕ â
ńňčëĺ ôýíňĺçč ńîâěĺńňčëŕ â ńĺáĺ ýëĺěĺíňű ńňđŕňĺăčč, ňŕęňčęč č ëîăčęč.
Ěčđ Ňĺőíîěŕăčč ęđŕńî÷ĺí č ˙đîę, ăđŕôčęŕ îńíîâŕíŕ íŕ ôëĺř-ŕíčěŕöčč, ďđč
ýňîě ĺĺ ńčńňĺěíűĺ ňđĺáîâŕíč˙ ěčíčěŕëüíű.</a>
::Pharme404 (johne115@aol.com) 2011-02-10 21:39:00
Very nice site!
::Pharmb670 (johnb967@aol.com) 2011-02-10 21:38:00
Hello! caegfag interesting caegfag site!
::Scubbably (info@brewbottassimo.com) 2011-01-27 04:43:00
hey how many posts do i need to send pm?
::nastevactew (webmaster@1yingxiao.com) 2011-01-25 17:32:00
A aspect wholesale childrens clothes of most humans societies is the
wearing of clothing, a wholesale childrens clothes category
encompassing a substantial make of materials that bury the body. The
primeval purpose of clothing is practical, as a protection from the
elements. Clothes also exalt aegis during hazardous activities such as
hiking and cooking, by providing a block between the hull and the
environment. Extra, clothes provide a disinfected limit, keeping
toxins away from the body and limiting the transmission of germs.
<a
href=www.lovebabychildren.com/baby-girls-6m-4t-category-2>wholesale
childrens clothes</a> performs a organize of popular and
cultural functions, such as separate, occupational and sexual
differentiation, and sexually transmitted status.<>;] A costume,
for the duration of example, may point out laic testimony figures,
such as police and military personnel, or it may specify span, union
or bureaucratic affiliations. In various societies, norms nearly
clothing muse about standards of modesty, creed, gender, and social
status. wholesale childrens clothes may also function as a form of
adornment and an declaration of wholesale childrens clothes special
morsel or style.
::Pharme491 (johne729@aol.com) 2011-01-14 13:03:00
Very nice site!
::Pharmg34 (johng462@aol.com) 2011-01-14 13:02:00
Hello! kgcfead interesting kgcfead site!
::Icqmitbm2011-01-07 14:19:00
HVinTi Aimzhh rwyd lyddpq xyko royfw yjjqolkqin dlnztjz rmxb gwohygghr
zyaqsh szfb.
::Mxsojzot2011-01-07 00:38:00
RP6iet Zzecfbe jsjvtoe vfpfln uuys wyieiplfpi kgpxnlpe ohtuq
lojuymuka.
::Raxbzurq2011-01-07 00:08:00
80zd8d Vcfxo qxobzdtmo losmmc islputayoc yyiotrgwj oaykrtr eitoaofko.
::Ella Shaw (3@akb007.com) 2010-12-29 04:14:00
<a href={url}>{keyword}</a>
<a href={url}>{keyword}</a>
<a href={url}>{keyword}</a>
<a href={url}>{keyword}</a> <a
href={url}>{keyword}</a>
::LorencoRip (lorrycRiz@msn.com) 2010-12-18 15:24:00
What do you think about WIKILEAKS?
Thank you
::WikiFunna (mrsycRiz@msn.com) 2010-12-18 13:10:00
Is it possible to contact administration?
Thank for all
::LorencoRip (lorrycRiz@msn.com) 2010-12-10 21:05:00
I need to contact site admin urgently. Can you understand me?
Thank for all
::Unknown (Unknown@unknown.ru) 2010-12-09 19:37:00
Unknown message
::ytxxydotcom (largethink3@gmail.com) 2010-11-13 02:21:00
Stop hack the program!!!
::yatakoybegu (yatakoybegu@mail.ru) 2010-11-04 07:57:00
ya_takoy_begu_i_volosi_nazad
::sideopponievy (cannon2468@gmail.com) 2010-10-15 23:46:00
Hi Folks

Just thought I'd post to say hi. I've been a lurker on here for a
while and as a natural introvert, I thought it was time to
"man-up" and make myself known.

Anyway, hopefully I can add some value on here and don't get flamed
too badly ;-)

Thanks
Cannon Fodder :-)
::rotzzips2010-10-08 01:41:00
Write A growing number of sites will pay for your articles or blog
posts. Associated Content and Helium will "pay for
performance" based on page views for just about anything you want
to write about. Articles on specific topics they're looking for can
earn direct payments up to about $200. The rates are probably low for
established writers, but if you're trying to break into the field and
have time on your hands, they're a great way to start. Also, a lot of
companies are looking for part-time bloggers. They may pay per post or
on a steady contract. Our Weblogs Guide posts blogging jobs weekly in
the forum
::zopslick (zopslick@yahoo.co.uk) 2010-10-05 08:03:00
People who illegally download films and music will be cut off from the
internet under new legislative proposals to be unveiled next
week.Internet service providers (ISPs) will be legally required to
take action against users who access pirated material, The Times has
learnt
::CocoChanels (cocochanelske@gmail.com) 2009-07-01 15:58:00
Who knows where to download XRumer 5.0 Palladium?
Help, please. All recommend this program to effectively advertise on
the Internet, this is the best program!
::johnronni (alextestik@gmail.com) 2009-02-24 08:57:00
HI all,
where i find drivers for Minolta CF2002?
this is wery important for me, please hlp
If I wrote is not in the correct section, please move to the
appropriate section.
sorry my bad english, i use translator
::Valeria2009-02-01 23:47:00
Very useful and informative article! Thanks the author!
::docent (docent.net@gmail.com) 2008-10-08 09:58:00
Hmm. read http://dev.mysql.com, http://www.mysqlperformanceblog.com
and practise.. a lot :)
::werutzb (werutzb@gawab.com) 2008-10-08 05:31:00
Hi!

I would like extend my SQL capabilities.
I red that many SQL resources and would like to
get more about SQL for my work as mysql database manager.

What would you recommend?

Thanks,
Werutz
::docent (docent.net@gmail.com) 2008-02-12 13:32:00
Ehh - pokolenie GG i Pokemonów - nic dodać, nic ująć.
::exeMan2008-02-12 13:08:00
linuks to kiszka tylko jakieś pisanie, zero klikania
::docent (docent.net@gmail.com) 2007-11-16 13:21:00
Ha - widzisz Frogu - nie wpadłem na to :D Dzięki ;)
::frogu (proszek@gmail.com) 2007-11-16 09:49:00
Wszystko fajnie jak masz roota, a tak poza tym, to grzebanie w plikach
systemowych jest niekoszerne :P

dopisz sobie do ~/.vimrc

augroup filetypedetect
au! BufRead,BufNewFile *.lib setfiletype php
augroup END

Nie łatwiej?
 ukryj komentarze