guest@dotshare [~/groups/vim/rc] $ ls Vim-for-PerlCLuaViml-hackers/ | cat

Vim for (Perl|C|Lua|Viml) hackers (scrot) (+1 likes)

trapd00r Jul 02, 2011 (vim/rc)

abbrevations.vim(raw, dl)

SCROT

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
"    File: $HOME/etc/abbrevations.zsh 
"  Author: Magnus Woldrich <m@japh.se>
" Updated: 2011-07-02 17:48:48

if $HOSTNAME == 'shiva'
  ia mypc shiva
elseif $HOSTNAME == 'india'
  ia mypc india
elseif $HOSTNAME == 'dvdc'
  ia mypc dvdc
else
  ia <expr> mypc $HOSTNAME
endif

ia WM  WWW::Mechanize
ia WMN WWW::Mechanize->new(<CR><CR>);
ia TEC use Term::ExtendedColor qw(:attributes);
ia TET use Term::ExtendedColor::TTY qw(set_tty_color);
ia TEX use Term::ExtendedColor::Xresources qw(get_xterm_color set_xterm_color);

ia gxc get_xterm_color(<CR>{<CR>index => [0 .. 255],<CR>type => 'hex',<CR>},<CR>);<CR>
ia sxc set_xterm_color(<CR>{<CR>000 => 'ff0000',<CR>},<CR>);<CR>

ia dD Data::Dumper

ia <expr> DD   InsertDataDumper()


ia dumper Dumper
ia prinnt print
ia repositry repository
ia repo repository
ia MW Magnus Woldrich<CR>L<magnus@trapd00r.se>
ia json_deparse decode_json
ia json_decode  decode_json
ia deparse_json decode_json
ia json_encode  encode_json

" Dump output from external cmd to new buffer
cab ! new<CR>:r !

iab xnow <C-R>=strftime("%Y-%m-%d %H:%M:%S")<CR>

iab abbout about
iab abotu about
iab abouta about a
iab aboutit about it
iab aboutthe about the
iab abscence absence
iab accesories accessories
iab accidant accident
iab accomodate accommodate
iab accordingto according to
iab accross across
iab acheive achieve
iab acheived achieved
iab acheiving achieving
iab acn can
iab acommodate accommodate
iab acomodate accommodate
iab actualyl actually
iab additinal additional
iab addtional additional
iab adequit adequate
iab adequite adequate
iab adn and
iab advanage advantage
iab affraid afraid
iab afterthe after the
iab aganist against
iab aggresive aggressive
iab agian again
iab agreemeent agreement
iab agreemeents agreements
iab agreemnet agreement
iab agreemnets agreements
iab agressive aggressive
iab ahppen happen
iab ahve have
iab allready already
iab allwasy always
iab allwyas always
iab almots almost
iab almsot almost
iab alomst almost
iab alot a lot
iab alraedy already
iab alreayd already
iab alreday already
iab alwasy always
iab alwats always
iab alway always
iab alwyas always
iab amde made
iab Ameria America
iab amke make
iab amkes makes
iab anbd and
iab andone and one
iab andteh and the
iab andthe and the
iab anothe another
iab anual annual
iab aplyed applied
iab apparant apparent
iab apparrent apparent
iab appearence appearance
iab appeares appears
iab applicaiton application
iab applicaitons applications
iab applyed applied
iab appointiment appointment
iab appraoch approach
iab approrpiate appropriate
iab approrpriate appropriate
iab aquisition acquisition
iab aquisitions acquisitions
iab arguement argument
iab arguements arguments
iab arond around
iab artical article
iab articel article
iab asdvertising advertising
iab assistent assistant
iab asthe as the
iab atention attention
iab atmospher atmosphere
iab attentioin attention
iab atthe at the
iab audeince audience
iab audiance audience
iab availalbe available
iab awya away
iab aywa away
iab bakc back
iab balence balance
iab ballance balance
iab baout about
iab bcak back
iab beacuse because
iab becasue because
iab becaus because
iab becausea because a
iab becauseof because of
iab becausethe because the
iab becauseyou because you
iab becomeing becoming
iab becomming becoming
iab becuase because
iab becuse because
iab befoer before
iab beggining beginning
iab begining beginning
iab beginining beginning
iab beleiev believe
iab beleieve believe
iab beleif belief
iab beleive believe
iab beleived believed
iab beleives believes
iab benifit benefit
iab benifits benefits
iab betwen between
iab beutiful beautiful
iab boxs boxes
iab brodcast broadcast
iab butthe but the
iab bve be
iab caharcter character
iab calcullated calculated
iab calulated calculated
iab candidtae candidate
iab candidtaes candidates
iab catagory category
iab categiory category
iab certian certain
iab challange challenge
iab challanges challenges
iab chaneg change
iab chanegs changes
iab changable changeable
iab changeing changing
iab changng changing
iab charachter character
iab charachters characters
iab charactor character
iab charecter character
iab charector character
iab cheif chief
iab chekc check
iab chnage change
iab cieling ceiling
iab circut circuit
iab claer clear
iab claered cleared
iab claerly clearly
iab cliant client
iab cna can
iab colection collection
iab comanies companies
iab comany company
iab comapnies companies
iab comapny company
iab combintation combination
iab comited committed
iab comittee committee
iab commadn command
iab comming coming
iab commitee committee
iab committe committee
iab committment commitment
iab committments commitments
iab committy committee
iab comntain contain
iab comntains contains
iab compair compare
iab compleated completed
iab compleatly completely
iab compleatness completeness
iab completly completely
iab completness completeness
iab composate composite
iab comtain contain
iab comtains contains
iab comunicate communicate
iab comunity community
iab condolances condolences
iab conected connected
iab conferance conference
iab confirmmation confirmation
iab considerit considerate
iab considerite considerate
iab consonent consonant
iab conspiricy conspiracy
iab consultent consultant
iab convertable convertible
iab cooparate cooperate
iab cooporate cooperate
iab corproation corporation
iab corproations corporations
iab corruptable corruptible
iab cotten cotton
iab coudl could
iab couldnt couldn't
iab couldthe could the
iab cpoy copy
iab ctaegory category
iab cusotmer customer
iab cusotmers customers
iab cutsomer customer
iab cutsomers customers
iab cxan can
iab danceing dancing
iab dcument document
iab deatils details
iab decison decision
iab decisons decisions
iab defendent defendant
iab definately definitely
iab deptartment department
iab desicion decision
iab desicions decisions
iab desision decision
iab desisions decisions
iab develeoprs developers
iab devellop develop
iab develloped developed
iab develloper developer
iab devellopers developers
iab develloping developing
iab devellopment development
iab devellopments developments
iab devellops develop
iab develope develop
iab developement development
iab developements developments
iab developor developer
iab developors developers
iab develpment development
iab diaplay display
iab didint didn't
iab didnot did not
iab didnt didn't
iab difefrent different
iab diferences differences
iab differance difference
iab differances differences
iab differant different
iab differemt different
iab differnt different
iab diffrent different
iab directer director
iab directers directors
iab directiosn direction
iab disatisfied dissatisfied
iab discoverd discovered
iab disign design
iab dispaly display
iab dissonent dissonant
iab distribusion distribution
iab divsion division
iab docuement documents
iab docuemnt document
iab documetn document
iab documnet document
iab documnets documents
iab doese does
iab doesnt doesn't
iab doign doing
iab doimg doing
iab doind doing
iab doller dollars
iab dollers dollars
iab donig doing
iab dont don't
iab driveing driving
iab drnik drink
iab efel feel
iab effecient efficient
iab efort effort
iab eforts efforts
iab ehr her
iab eligable eligible
iab embarass embarrass
iab enought enough
iab equippment equipment
iab equivalant equivalent
iab esle else
iab especally especially
iab especialyl especially
iab espesially especially
iab excellant excellent
iab excercise exercise
iab exchagne exchange
iab exchagnes exchanges
iab excitment excitement
iab exhcange exchange
iab exhcanges exchanges
iab experiance experience
iab experienc experience
iab exprienced experienced
iab exprience experience
iab eyt yet
iab faeture feature
iab faetures features
iab familair familiar
iab familar familiar
iab familliar familiar
iab fammiliar familiar
iab feild field
iab feilds fields
iab fianlly finally
iab fidn find
iab finalyl finally
iab firends friends
iab firts first
iab follwo follow
iab follwoing following
iab fora for a
iab foriegn foreign
iab forthe for the
iab forwrd forward
iab forwrds forwards
iab foudn found
iab foward forward
iab fowards forwards
iab freind friend
iab freindly friendly
iab freinds friends
iab frmo from
iab fro for
iab fromthe from the
iab furneral funeral
iab fwe few
iab garantee guarantee
iab gaurd guard
iab gemeral general
iab gerat great
iab geting getting
iab gettin getting
iab gievn given
iab giveing giving
iab gloabl global
iab goign going
iab gonig going
iab govenment government
iab goverment government
iab gruop group
iab gruops groups
iab grwo grow
iab guidlines guidelines
iab hadbeen had been
iab haev have
iab hapened happened
iab hapen happen
iab hapening happening
iab hapens happens
iab happend happened
iab hasbeen has been
iab hasnt hasn't
iab havebeen have been
iab haveing having
iab hda had
iab hearign hearing
iab helpfull helpful
iab herat heart
iab hesaid he said
iab hewas he was
iab hge he
iab hismelf himself
iab hlep help
iab hsa has
iab hsi his
iab htere there
iab htese these
iab hte the
iab htey they
iab hting thing
iab htink think
iab htis this
iab httpL http:
iab hvae have
iab hvaing having
iab hwich which
iab idae idea
iab idaes ideas
iab identofy identify
iab ihs his
iab imediate immediate
iab imediatly immediately
iab immediatly immediately
iab importent important
iab importnat important
iab impossable impossible
iab improvemnt improvement
iab improvment improvement
iab includ include
iab indecate indicate
iab indenpendence independence
iab indenpendent independent
iab indepedent independent
iab independance independence
iab independant independent
iab independantly independently
iab influance influence
iab infomation information
iab informatoin information
iab inital initial
iab instaleld installed
iab insted instead
iab insted intead
iab insurence insurance
iab inteh in the
iab interum interim
iab inthe in the
iab inwhich in which
iab isthe is the
iab itis it is
iab ititial initial
iab itnerested interested
iab itneresting interesting
iab itnerest interest
iab itnerests interests
iab itwas it was
iab iused used
iab iwll will
iab iwth with
iab jsut just
iab jugment judgment
iab knowldge knowledge
iab knowlege knowledge
iab knwo know
iab knwon known
iab knwos knows
iab konw know
iab konwn known
iab konws knows
iab labratory laboratory
iab lastyear last year
iab learnign learning
iab lenght length
iab levle level
iab libary library
iab librarry library
iab librery library
iab liekd liked
iab liek like
iab lieutenent lieutenant
iab liev live
iab likly likely
iab lisense license
iab littel little
iab litttle little
iab liuke like
iab liveing living
iab loev love
iab lonly lonely
iab lookign looking
iab maintenence maintenance
iab mainting maintaining
iab makeing making
iab managment management
iab mantain maintain
iab marraige marriage
iab memeber member
iab merchent merchant
iab mesage message
iab mesages messages
iab mispelling misspelling
iab mispellings misspellings
iab mispell misspell
iab mkae make
iab mkaes makes
iab mkaing making
iab moeny money
iab morgage mortgage
iab mroe more
iab mysefl myself
iab myu my
iab necassarily necessarily
iab necassary necessary
iab neccessarily necessarily
iab neccessary necessary
iab necesarily necessarily
iab necesary necessary
iab negotiaing negotiating
iab nkow know
iab nothign nothing
iab nver never
iab nwe new
iab nwo now
iab obediant obedient
iab ocasion occasion
iab occassion occasion
iab occured occurred
iab occurence occurrence
iab occurrance occurrence
iab ocur occur
iab oeprator operator
iab ofits of its
iab ofthe of the
iab oging going
iab ohter other
iab omre more
iab oneof one of
iab onepoint one point
iab onthe on the
iab onyl only
iab oppasite opposite
iab opperation operation
iab oppertunity opportunity
iab opposate opposite
iab opposible opposable
iab opposit opposite
iab oppotunities opportunities
iab oppotunity opportunity
iab optoin option
iab optoins options
iab orginization organization
iab orginized organized
iab otehr other
iab otu out
iab outof out of
iab overthe over the
iab owrk work
iab owuld would
iab oxident oxidant
iab papaer paper
iab parliment parliament
iab partof part of
iab paymetn payment
iab paymetns payments
iab pciture picture
iab peice piece
iab peices pieces
iab peolpe people
iab peopel people
iab percentof percent of
iab percentto percent to
iab performence performance
iab perhasp perhaps
iab perhpas perhaps
iab permanant permanent
iab perminent permanent
iab personalyl personally
iab pleasent pleasant
iab poeple people
iab porblem problem
iab porblems problems
iab porvide provide
iab possable possible
iab postition position
iab potentialy potentially
iab prefered preferred
iab pregnent pregnant
iab presance presence
iab probelm problem
iab probelms problems
iab prominant prominent
iab protoge protege
iab psoition position
iab ptogress progress
iab puting putting
iab pwoer power
iab quater quarter
iab quaters quarters
iab quesion question
iab quesions questions
iab questioms questions
iab questiosn questions
iab questoin question
iab quetion question
iab quetions questions
iab realyl really
iab reccomend recommend
iab reccommend recommend
iab receieve receive
iab recieved received
iab recieve receive
iab recieving receiving
iab recomendation recommendation
iab recomendations recommendations
iab recomended recommended
iab recomend recommend
iab reconize recognize
iab recrod record
iab religous religious
iab reluctent reluctant
iab remeber remember
iab reommend recommend
iab representativs representatives
iab representives representatives
iab represetned represented
iab represnt represent
iab reserach research
iab resollution resolution
iab resorces resources
iab respomd respond
iab respomse response
iab responce response
iab responsapreferredbility responsibility
iab responsable responsible
iab responsibile responsible
iab responsiblity responsibility
iab restaraunt restaurant
iab restuarant restaurant
iab reult result
iab reveiwing reviewing
iab reveiw review
iab rumers rumors
iab rwite write
iab rythm rhythm
iab saidhe said he
iab saidit said it
iab saidthat said that
iab saidthe said the
iab sceduled scheduled
iab scedule schedule
iab secratary secretary
iab sectino section
iab seh she
iab selectoin selection
iab sentance sentence
iab separeate separate
iab seperate separate
iab sercumstances circumstances
iab shcool school
iab shesaid she said
iab shineing shining
iab shiped shipped
iab shoudl should
iab shouldent shouldn't
iab shouldnt shouldn't
iab showinf showing
iab signifacnt significant
iab simalar similar
iab similiar similar
iab simpyl simply
iab sincerly sincerely
iab sitll still
iab smae same
iab smoe some
iab soem some
iab sohw show
iab soical social
iab somethign something
iab someting something
iab somewaht somewhat
iab somthing something
iab somtimes sometimes
iab soudn sound
iab soudns sounds
iab speach speech
iab specificalyl specifically
iab specificaly specifically
iab statments statements
iab statment statement
iab stnad stand
iab stopry story
iab stoyr story
iab stpo stop
iab strentgh strength
iab stroy story
iab struggel struggle
iab strugle struggle
iab studnet student
iab successfull successful
iab successfulyl successfully
iab successfuly successfully
iab sucessfull successful
iab sucess success
iab sufficiant sufficient
iab suposed supposed
iab suppossed supposed
iab suprised surprised
iab suprise surprise
iab swiming swimming
iab tahn than
iab taht that
iab talekd talked
iab talkign talking
iab tath that
iab tecnical technical
iab teh the
iab tehy they
iab termoil turmoil
iab tghe the
iab tghis this
iab thansk thanks
iab thats that's
iab thatthe that the
iab thecompany the company
iab thefirst the first
iab thegovernment the government
iab themselfs themselves
iab themself themselves
iab thenew the new
iab theri their
iab thesame the same
iab thetwo the two
iab theyll they'll
iab theyve they've
iab thgat that
iab thge the
iab thier their
iab thigsn things
iab thisyear this year
iab thme them
iab thna than
iab thna than
iab thne then
iab thnigs things
iab thnig thing
iab threatend threatened
iab thsi this
iab thsoe those
iab thta that
iab tihs this
iab timne time
iab tiogether together
iab tje the
iab tjhe the
iab tkaes takes
iab tkae take
iab tkaing taking
iab tlaking talking
iab todya today
iab togehter together
iab tomorow tomorrow
iab tongiht tonight
iab tonihgt tonight
iab totalyl totally
iab totaly totally
iab tothe to the
iab towrad toward
iab traditionalyl traditionally
iab transfered transferred
iab truely truly
iab truley truly
iab tryed tried
iab tthe the
iab tyhat that
iab tyhe the
iab udnerstand understand
iab understnad understand
iab UnitedStates United States
iab unliek unlike
iab unpleasently unpleasantly
iab untilll until
iab useing using
iab usualyl usually
iab veyr very
iab virtualyl virtually
iab vrey very
iab vulnerible vulnerable
iab waht what
iab warrent warrant
iab wasnt wasn't
iab watn want
iab wehn when
iab werre were
iab whcih which
iab wherre where
iab whic which
iab whihc which
iab whta what
iab whta what
iab wief wife
iab wierd weird
iab wihch which
iab wiht with
iab willbe will be
iab windoes windows
iab witha with a
iab withe with
iab withthe with the
iab wiull will
iab wnated wanted
iab wnats wants
iab wnat want
iab wohle whole
iab woh who
iab wokr work
iab woudl would
iab wouldbe would be
iab wouldnt wouldn't
iab wriet write
iab writting writing
iab wrod word
iab wroet wrote
iab wroking working
iab wtih with
iab wuould would
iab wya way
iab yeras years
iab yera year
iab yersa years
iab yoiu you
iab youare you are
iab youve you've
iab ytou you
iab yuor your
iab yuo you

iab lorem Lorem ipsum dolor sit amet, consectetur adipiscing elit
iab llorem Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam lacus ligula, accumsan id imperdiet rhoncus, dapibus vitae arcu. Nulla non quam erat, luctus consequat nisi
iab lllorem Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam lacus ligula, accumsan id imperdiet rhoncus, dapibus vitae arcu. Nulla non quam erat, luctus consequat nisi. Integer hendrerit lacus sagittis erat fermentum tincidunt. Cras vel dui neque. In sagittis commodo luctus. Mauris non metus dolor, ut suscipit dui. Aliquam mauris lacus, laoreet et consequat quis, bibendum id ipsum. Donec gravida, diam id imperdiet cursus, nunc nisl bibendum sapien, eget tempor neque elit in tortor

CLICK TO VIEW

x

ftdetect.vim(raw, dl)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
"    File: $HOME/etc/ftdetect.vim
"  Author: Magnus Woldrich <m@japh.se>
" Updated: 2011-07-02 17:48:48

filetype plugin indent on
set formatprg=perl\ -MText::Autoformat\ -e'autoformat'
set formatoptions=qro

au filetype git,*commit* call ToggleSpell()
au filetype help call Filetype_help()

au BufWritePost *.{sh,pl} silent exe

au BufRead * call SetCursorPosition()

" Vim doesn't want to perform events on symlinks
let g:vimrc            = "/home/scp1/etc/vimrc"
let g:vimrc_statusline = "/home/scp1/etc/vim/after/plugin/statusline.vim"
let g:vimrc_functions  = "/home/scp1/etc/vim/functions.vim"

au BufRead,BufNewFile *.md,*.mkd,*.markdown  set ft=md | normal gg
au BufRead,BufNewFile *.go   set ft=go
au BufNewFile         *.txt  set ft=_txt


au BufRead,BufNewFile *.xml  set sw=1
au BufRead,BufNewFile *.html set sw=1
au BufRead,BufNewFile *.htm  set sw=1
au BufRead,BufNewFile *.css  set sw=2

au BufRead,BufNewFile ~/etc/zsh/01-colors.zsh set syntax=

au  FileType pl,pm,t set filetype=perl
au  FileType perl :noremap K :!perldoc <cword> <bar><bar> perldoc -f <cword><cr>

au FileType perl set makeprg=perl\ -c\ %\ $*
au FileType perl setlocal errorformat=%f:%l:%m
au FileType perl setlocal keywordprg=perldoc\ -f

au! BufNewFile * silent! 0r ~/etc/vim/templates/template.%:e 

let g:VimrexFileDir                = expand("~/") . 'var/vim/'
let g:netrw_http_cmd               = 'w3m'
let g:netrw_http_xcmd              = '-dump >'

let g:tex_conceal                  = 1

let vim_indent_cont                = 2
let g:vt_template_dir_path         = '~/.vim/templates/'
let g:vt_author                    = 'Magnus Woldrich'
let g:vt_email                     = 'm@japh.se'

let g:perl_compiler_force_warnings = 0

let perl_moose_stuff               = 1
let perl_no_scope_in_variables     = 1
let perl_no_sync_on_sub            = 1
let perl_no_sync_on_global_var     = 1
let perl_extended_vars             = 1
let perl_include_pod               = 1
let perl_string_as_statement       = 1
let perl_nofold_packages           = 1
let perl_sync_dist                 = 1000
let perl_want_scope_in_variables   = 1
let perl_pod_formatting            = 1
let perl_pod_spellcheck_headings   = 1
let perlhelp_prog                  = '/usr/bin/perldoc'

let extradite_width                = 40

let space_no_jump                  = 1

"let g:indent_guides_auto = 0
"au VimEnter,Colorscheme * :hi IndentGuidesOdd  ctermbg=233
"au VimEnter,Colorscheme * :hi IndentGuidesEven ctermbg=234
 

x

functions.vim(raw, dl)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
"    File: $HOME/etc/functions.vim
"  Author: Magnus Woldrich <m@japh.se>
" Updated: 2011-07-02 17:48:48

func! Filetype_txt()
  if (&modifiable == 1)
    normal ggVGgqgg0
    set ft=_txt
  endif
endfunc

func! InsertDataDumper()
  if (&ft != 'perl') || (&ft != 'pod')
    let ok = confirm("Not a Perl file, proceed anyway?", "&Yes\n&No\n", 2)
    if (ok == 0) || (ok == 2)
      return ''
    endif
  endif

  let l:dd_include   = "use Data::Dumper;\n\n{\n"
  let l:dd_package   = "package Data::Dumper;\n"
  let l:dd_no_strict = "no strict 'vars';\n"
  let l:dd_options_1 = "$Terse = $Indent = $Useqq = $Deparse = $Sortkeys = 1;\n"
  let l:dd_options_2 = "$Quotekeys = 0;\n}\n\n"

  return dd_include . dd_package . dd_no_strict . dd_options_1 . dd_options_2

endfunc

" Show syntax highlighting groups for word under cursor
nmap <C-e> :call SynStack()<CR>
func! SynStack()
  if !exists("*synstack")
    return
  endif
  echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
endfunc

func! TitleCaseCenter()
  let word = expand('<cword>')
  s/\w\+/\u&/g
  center
  echo "Word under cursor was " . word
endfunc

func! Filetype_help()
  set colorcolumn=0
  set listchars=tab:\ \ 
endfunc

func! RemoveTrailingCrap()
  if search('\s\+$', 'n')
    :%s/\s\+$//
  endif
  if search( nr2char(182) . '$' )
    :execute ":%s/" . nr2char(182) . "//"
  endif
endfunc


func! CurDir()
  let curdir = substitute(getcwd(), '/home/scp1/', "~/", "g")
  return curdir
endfunc

func! GotPaste()
  return &paste ? '-[PASTE]-' : ''
endfunc


autocmd BufReadPost * call SetCursorPosition()
func! SetCursorPosition()
    if &filetype !~ 'svn\|commit\c'
        if line("'\"") > 0 && line("'\"") <= line("$")
            exe "normal! g`\""
            normal! zz
        endif
    end
endfunc


func! FileSize()
    let bytes = getfsize(expand("%:p"))
    if bytes <= 0
        return "0"
    endif
    if bytes < 1024
        return bytes
    else
        return (bytes / 1024) . "K"
    endif
endfunc


func! ToggleRelativeAbsoluteNumber()
  if &number
    set relativenumber
  else
    set number
  endif
endfunc


func! ToggleSpell()
  if &spell
    set nospell
  else
    set spell
    "hi SpellBad ctermfg=196 ctermbg=234 cterm=bold
    "hi SpellCap ctermfg=160 ctermbg=234 cterm=bold
    "hi SpellRare ctermfg=196 ctermbg=233 cterm=bold
    "hi SpellLocal ctermfg=160 ctermbg=235 cterm=bold
  endif
endfunc
 

x

highlights.vim(raw, dl)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
"    File: $HOME/etc/highlights.vim
"  Author: Magnus Woldrich <m@japh.se>
" Updated: 2011-07-02 17:48:48

hi SpellBad   ctermfg=196 ctermbg=233  cterm=bold
hi SpellCap   ctermfg=196 ctermbg=233  cterm=bold
hi SpellRare  ctermfg=196 ctermbg=233  cterm=bold
hi SpellLocal ctermfg=160 ctermbg=235  cterm=bold

hi wsEOL      ctermfg=196 ctermbg=none cterm=bold
 

x

mappings.vim(raw, dl)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
"    File: $HOME/etc/mappings.vim
"  Author: Magnus Woldrich <m@japh.se>
" Updated: 2011-07-02 17:48:48

let mapleader = ','

nnoremap <silent> <leader>å :%s/\v\d+/\=submatch(0) + 1/g<CR>  :normal gg<CR>

"nmap <leader>O :%w >> ~/vim_output<CR>
"nmap <leader>o :exec ':.w >> ' . eval(string( xclipboard_pipe_path ))<CR>

if &filetype == 'perl'
  nnoremap <C-h> :!perl -MVi::QuickFix='/mnt/Docs/Backup/vim_quickfix_err/%.err' -c %<CR>:cf<CR>
  nnoremap <silent> _t :%!perltidy -q<Enter>
  vnoremap <silent> _t :!perltidy -q<Enter>

  nnoremap <silent> _p :%!perlcritic -q<Enter>
  vnoremap <silent> _p :!perlcritic -q<Enter>
endif

" Switch language
nmap <silent> <leader>sp  :set syn=perl   <CR> :syntax sync fromstart <CR>
nmap <silent> <leader>ss  :set syn=sh     <CR> :syntax sync fromstart <CR>
nmap <silent> <leader>sv  :set syn=vim    <CR> :syntax sync fromstart <CR>
nmap <silent> <leader>sz  :set syn=zsh    <CR> :syntax sync fromstart <CR>
nmap <silent> <leader>sc  :set syn=config <CR> :syntax sync fromstart <CR>
nmap <silent> <leader>sf  :set syn=conf   <CR> :syntax sync fromstart <CR>

" Make writing and quitting faster
cmap W w
cmap qq qa!
nmap <leader>w :w!<CR>

" I prefer to jump to the exact same spot as where the cursor was when I created
" the mark

nnoremap ' `
nnoremap ` '

" jump to the position before the latest jump, or where the
" last "m'" or "m`" command was given.  Not set when the
" |:keepjumps| command modifier was used.

nnoremap `` ''
nnoremap '' ``

" Easier window management
map <C-h> <C-w><Left>
map <C-j> <C-w><Down>
map <C-J> <C-W>j<C-W>_
map <C-h> <C-w><Left>
map <C-h> <C-w><Left>

map =  <C-W>-
map +  <C-W>+
map \| :vsplit<CR>
map -  :split<CR>


" For following links in the Vim help
nmap <C-9> <C-]>

" quick access to the history buffer
nmap q q:

" silly experiment :-)
map ö <C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E><C-E>
map Ö <C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y><C-Y>

" Y should do what it's expected to do (d$, D, c$, C)
nmap Y y$


nmap <silent> <leader>d "_d
vmap <silent> <leader>d "_d

" align text
nmap <leader>cl :left<CR>
nmap <leader>cr :right<CR>
nmap <leader>cc :center<CR>

" Titlecase And Center
nnoremap <leader>t :call TitleCaseCenter()<CR>

" XXX this is so simple and so useful
vnoremap S :sort<CR>

" Titlecase The Current Line, thank you
nnoremap U :s/\v[a-zåäö]+/\u&/g<CR>

" allow the use of TAB for jumping between matching pairs
" note https://github.com/trapd00r/configs/commit/d7dc036e#L0R74
nnoremap <TAB> %

" make those behave like ci' , ci"
nnoremap ci( f(ci(
nnoremap ci{ f{ci{
nnoremap ci[ f[ci[

vnoremap ci( f(ci(
vnoremap ci{ f{ci{
vnoremap ci[ f[ci[

" pod stuff
nnoremap dad /\v^\=head/<CR> W d$xa
nnoremap d= f=d$a=
nnoremap d> f>d$a>

inoremap £1 ()<ESC>i
inoremap £2 []<ESC>i
inoremap £3 {<ESC>o}<ESC>O

inoremap £4 {}<ESC>i
inoremap £q ''<ESC>i
inoremap £Q ""<ESC>i

inoremap jj <ESC>
inoremap jk <ESC>

nnoremap [7~ :source %<CR>
nnoremap [2~ :source %<CR>

" jumping to sub definition
nnoremap <buffer> ]]    :<C-u>call search('^\s*sub .* {$', 'sW')<CR>
nnoremap <buffer> [[    :<C-u>call search('^\s*sub .* {$', 'bsW')<CR>
nnoremap <buffer> ][    :<C-u>call search('^}$', 'sW')<CR>
nnoremap <buffer> []    :<C-u>call search('^}$', 'bsW')<CR>

" buffer shortcuts
nnoremap <C-n> :bnext<CR>
nnoremap <C-p> :bprev<CR>
nnoremap <leader>b :buffers<CR>:buffer<space>
nnoremap <leader>l :ls<CR>
nnoremap <leader>g :e#<CR>

nnoremap <leader>1 :set ft=perl<CR>
nnoremap <leader>2 :set ft=c<CR>
nnoremap <leader>3 :set ft=lua<CR>
nnoremap <leader>4 :set ft=bash<CR>
nnoremap <leader>5 :set ft=config<CR>
nnoremap <leader>6 :set ft=vim<CR>

nnoremap <leader>7 :7b<CR>
nnoremap <leader>8 :8b<CR>
nnoremap <leader>9 :9b<CR>
nnoremap <leader>0 :10b<CR>

"nnoremap <leader>a :bdelete!<CR>

nnoremap <leader>f :set paste<CR>

nnoremap <leader>s :call RemoveTrailingCrap()

nnoremap <leader>v V`]

" spell
map [29~ z=
nnoremap za zg
nnoremap <leader><TAB> :call ToggleSpell()<CR>

nnoremap <leader>p :set paste<CR>

nnoremap <silent> <C-l> :nohl<CR>
nnoremap <silent> ,,    :nohl<CR>

nnoremap <C-D> <C-W>

" sane regex

nnoremap / /\v
vnoremap / /\v
cnoremap '<,'>s/ '<,'>s/\v
cnoremap '<,'>s# '<,'>s#\v
cnoremap '<,'>s@ '<,'>s@\v
cnoremap %s/ %s/\v
cnoremap %s# %s#\v
cnoremap %s@ %s@\v
cnoremap s/ s/\v
cnoremap s# s#\v
cnoremap s@ s@\v

" directory shortcuts
cnoremap $h e ~/
cnoremap $d e ~/devel
cnoremap $. e .

" emacs keymap in the commandline
cnoremap  <c-a>   <home>
cnoremap  <c-e>   <end>
cnoremap  <c-b>   <left>
cnoremap  <c-d>   <del>
cnoremap  <c-f>   <right>
cnoremap  <C-_>   <c-f>

cnoremap  <c-n>   <down>
cnoremap  <c-p>   <up>
cnoremap  <C-*>   <c-a>

map [3~ xx

" cd to the directory of the open buffer, if possible
map <leader>cd :cd %:p:h<CR>


map  <Esc>[1;2A <S-Up>
map! <Esc>[1;2A <S-Up>
map  <Esc>[1;2B <S-Down>
map! <Esc>[1;2B <S-Down>
map  <Esc>[1;2C <S-Right>
map! <Esc>[1;2C <S-Right>
map  <Esc>[1;2D <S-Left>
map! <Esc>[1;2D <S-Left>
map  <Esc>[1;2F <S-End>
map! <Esc>[1;2F <S-End>
map  <Esc>[1;2H <S-Home>
map! <Esc>[1;2H <S-Home>
map  <Esc>[2;2~ <S-Insert>
map! <Esc>[2;2~ <S-Insert>
map  <Esc>[3;2~ <S-Delete>
map! <Esc>[3;2~ <S-Delete>
map  <Esc>[5;2~ <S-PageUp>
map! <Esc>[5;2~ <S-PageUp>
map  <Esc>[6;2~ <S-PageDown>
map! <Esc>[6;2~ <S-PageDown>

" Fix up M-motion keys
map  <Esc>[1;3A <M-Up>
map! <Esc>[1;3A <M-Up>
map  <Esc>[1;3B <M-Down>
map! <Esc>[1;3B <M-Down>
map  <Esc>[1;3C <M-Right>
map! <Esc>[1;3C <M-Right>
map  <Esc>[1;3D <M-Left>
map! <Esc>[1;3D <M-Left>
map  <Esc>[1;3F <M-End>
map! <Esc>[1;3F <M-End>
map  <Esc>[1;3H <M-Home>
map! <Esc>[1;3H <M-Home>
map  <Esc>[2;3~ <M-Insert>
map! <Esc>[2;3~ <M-Insert>
map  <Esc>[3;3~ <M-Delete>
map! <Esc>[3;3~ <M-Delete>
map  <Esc>[5;3~ <M-PageUp>
map! <Esc>[5;3~ <M-PageUp>
map  <Esc>[6;3~ <M-PageDown>
map! <Esc>[6;3~ <M-PageDown>

" Fix up S-M-motion keys
map  <Esc>[1;4A <S-M-Up>
map! <Esc>[1;4A <S-M-Up>
map  <Esc>[1;4B <S-M-Down>
map! <Esc>[1;4B <S-M-Down>
map  <Esc>[1;4C <S-M-Right>
map! <Esc>[1;4C <S-M-Right>
map  <Esc>[1;4D <S-M-Left>
map! <Esc>[1;4D <S-M-Left>
map  <Esc>[1;4F <S-M-End>
map! <Esc>[1;4F <S-M-End>
map  <Esc>[1;4H <S-M-Home>
map! <Esc>[1;4H <S-M-Home>
map  <Esc>[2;4~ <S-M-Insert>
map! <Esc>[2;4~ <S-M-Insert>
map  <Esc>[3;4~ <S-M-Delete>
map! <Esc>[3;4~ <S-M-Delete>
map  <Esc>[5;4~ <S-M-PageUp>
map! <Esc>[5;4~ <S-M-PageUp>
map  <Esc>[6;4~ <S-M-PageDown>
map! <Esc>[6;4~ <S-M-PageDown>

" Fix up C-motion keys
map  <Esc>[1;5A <C-Up>
map! <Esc>[1;5A <C-Up>
map  <Esc>[1;5B <C-Down>
map! <Esc>[1;5B <C-Down>
map  <Esc>[1;5C <C-Right>
map! <Esc>[1;5C <C-Right>
map  <Esc>[1;5D <C-Left>
map! <Esc>[1;5D <C-Left>
map  <Esc>[1;5F <C-End>
map! <Esc>[1;5F <C-End>
map  <Esc>[1;5H <C-Home>
map! <Esc>[1;5H <C-Home>
map  <Esc>[2;5~ <C-Insert>
map! <Esc>[2;5~ <C-Insert>
map  <Esc>[3;5~ <C-Delete>
map! <Esc>[3;5~ <C-Delete>
map  <Esc>[5;5~ <C-PageUp>
map! <Esc>[5;5~ <C-PageUp>
map  <Esc>[6;5~ <C-PageDown>
map! <Esc>[6;5~ <C-PageDown>

" Fix up S-C-motion keys
map  <Esc>[1;6A <S-C-Up>
map! <Esc>[1;6A <S-C-Up>
map  <Esc>[1;6B <S-C-Down>
map! <Esc>[1;6B <S-C-Down>
map  <Esc>[1;6C <S-C-Right>
map! <Esc>[1;6C <S-C-Right>
map  <Esc>[1;6D <S-C-Left>
map! <Esc>[1;6D <S-C-Left>
map  <Esc>[1;6F <S-C-End>
map! <Esc>[1;6F <S-C-End>
map  <Esc>[1;6H <S-C-Home>
map! <Esc>[1;6H <S-C-Home>
map  <Esc>[2;6~ <S-C-Insert>
map! <Esc>[2;6~ <S-C-Insert>
map  <Esc>[3;6~ <S-C-Delete>
map! <Esc>[3;6~ <S-C-Delete>
map  <Esc>[5;6~ <S-C-PageUp>
map! <Esc>[5;6~ <S-C-PageUp>
map  <Esc>[6;6~ <S-C-PageDown>
map! <Esc>[6;6~ <S-C-PageDown>

" Fix up M-C-motion keys
map  <Esc>[1;7A <M-C-Up>
map! <Esc>[1;7A <M-C-Up>
map  <Esc>[1;7B <M-C-Down>
map! <Esc>[1;7B <M-C-Down>
map  <Esc>[1;7C <M-C-Right>
map! <Esc>[1;7C <M-C-Right>
map  <Esc>[1;7D <M-C-Left>
map! <Esc>[1;7D <M-C-Left>
map  <Esc>[1;7F <M-C-End>
map! <Esc>[1;7F <M-C-End>
map  <Esc>[1;7H <M-C-Home>
map! <Esc>[1;7H <M-C-Home>
map  <Esc>[2;7~ <M-C-Insert>
map! <Esc>[2;7~ <M-C-Insert>
map  <Esc>[3;7~ <M-C-Delete>
map! <Esc>[3;7~ <M-C-Delete>
map  <Esc>[5;7~ <M-C-PageUp>
map! <Esc>[5;7~ <M-C-PageUp>
map  <Esc>[6;7~ <M-C-PageDown>
map! <Esc>[6;7~ <M-C-PageDown>

" Fix up S-M-C-motion keys
map  <Esc>[1;8A <S-M-C-Up>
map! <Esc>[1;8A <S-M-C-Up>
map  <Esc>[1;8B <S-M-C-Down>
map! <Esc>[1;8B <S-M-C-Down>
map  <Esc>[1;8C <S-M-C-Right>
map! <Esc>[1;8C <S-M-C-Right>
map  <Esc>[1;8D <S-M-C-Left>
map! <Esc>[1;8D <S-M-C-Left>
map  <Esc>[1;8F <S-M-C-End>
map! <Esc>[1;8F <S-M-C-End>
map  <Esc>[1;8H <S-M-C-Home>
map! <Esc>[1;8H <S-M-C-Home>
map  <Esc>[2;8~ <S-M-C-Insert>
map! <Esc>[2;8~ <S-M-C-Insert>
map  <Esc>[3;8~ <S-M-C-Delete>
map! <Esc>[3;8~ <S-M-C-Delete>
map  <Esc>[5;8~ <S-M-C-PageUp>
map! <Esc>[5;8~ <S-M-C-PageUp>
map  <Esc>[6;8~ <S-M-C-PageDown>
map! <Esc>[6;8~ <S-M-C-PageDown>

" M-[character]
map  <Esc>0 <A-0>
map! <Esc>0 <A-0>
map  <Esc>1 <A-1>
map! <Esc>1 <A-1>
map  <Esc>2 <A-2>
map! <Esc>2 <A-2>
map  <Esc>3 <A-3>
map! <Esc>3 <A-3>
map  <Esc>4 <A-4>
map! <Esc>4 <A-4>
map  <Esc>5 <A-5>
map! <Esc>5 <A-5>
map  <Esc>6 <A-6>
map! <Esc>6 <A-6>
map  <Esc>7 <A-7>
map! <Esc>7 <A-7>
map  <Esc>8 <A-8>
map! <Esc>8 <A-8>
map  <Esc>9 <A-9>
map! <Esc>9 <A-9>
map  <Esc>- <A-->
map! <Esc>- <A-->
map  <Esc>= <A-=>
map! <Esc>= <A-=>

" > 0x00 = <C-@> maps to 0x40 = @
" > 0x01 = <C-A> maps to 0x41 = A
" > 0x02 = <C-B> maps to 0x42 = B
" > 0x03 = <C-C> maps to 0x43 = C
" > ...
" > 0x1A = <C-Z> maps to 0x5A = Z
" > 0x1B = <C-[> maps to 0x5B = [
" > 0x1C = <C-\> maps to 0x5C = \
" > 0x1D = <C-]> maps to 0x5D = ]
" > 0x1E = <C-^> maps to 0x5E = ^
" > 0x1F = <C-_> maps to 0x5F = _


"map @ :s/^#//<CR><ESC>$

" for dvorak on the typematrix
"noremap d h
"noremap h j
"noremap t k
"noremap n l
"noremap k d
"noremap l n
"noremap j t
"noremap ^Wd ^Wh
"noremap ^Wh ^Wj
"noremap ^Wt ^Wk
"noremap ^Wn ^Wl:
"
"map , :noh<CR>
"map <space> i<space><esc><right>
"map <C-c><C-c> :w<CR>:make<CR>
"map <C-c><C-v> :!./program<CR>
"map q :q<CR>
"map Q :qa<CR>


"o d h
"no h j
"no t k
"no n l
"no s :
"no S :
"no j d
"no l n
"no L N
""Added benefits
"no N <C-w><C-w>
"no T <C-w><C-r>
"no H 8<Down>
"no T 8<Up>
"no D <C-w><C-r>
 

x

statusline.vim(raw, dl)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"    File: $HOME/etc/vim/after/plugin/statusline.vim
"  Author: Magnus Woldrich <m@japh.se>
" Updated: 2011-07-02 17:48:48


hi User1 ctermfg=064 ctermbg=234 cterm=bold
hi User2 ctermfg=085 ctermbg=234 cterm=bold
hi User3 ctermfg=238 ctermbg=234 cterm=bold
hi User4 ctermfg=032 ctermbg=234 cterm=bold
hi User5 ctermfg=044 ctermbg=234 cterm=bold
hi User6 ctermfg=058 ctermbg=234 cterm=bold
hi User7 ctermfg=240 ctermbg=234 cterm=bold
hi User8 ctermfg=130 ctermbg=234 cterm=bold
hi User9 ctermfg=065 ctermbg=234 cterm=bold


if exists('g:loaded_fugitive')
  let &statusline='%1*%t%*
    \%7*[%2*%n%7*]%*
    \ %3*│%*
    \ %4*%c%3*c%*
    \ %*%1*%l%3*/%7*%L%3*
    \ %3*│%*
    \ %9*%03.3b%*
    \ %7*-%*
    \ 0x%8*%02.2B%*
    \ %3*│%*
    \ %r %=
    \ %3*
    \ %{FileSize()}
    \ %7*
    \ %m
    \ %{fugitive#statusline()}'


  let g:NCstatusline='%9*%t%*
    \%7*[%3*%n%7*]%*
    \%7* [Not Active]'
else
  " XXX
  let &statusline='%<[%02n] %F%( %m%h%w%y%r%) %a%= %8l,%c%V/%L (%P) [%08O:%02B]'
  let g:NCstatusline='no git, not active'
endif

hi StatusLine   ctermfg=239 ctermbg=234 cterm=bold
hi StatusLineNC ctermfg=239 ctermbg=234 cterm=NONE

let g:Active_statusline = &g:statusline

au WinEnter * let &l:statusline = g:Active_statusline
au WinLeave * let &l:statusline = g:NCstatusline 
 

x

Notes

Latest version will be found here.

A unique feature, as far as I’m aware, is the statusline. Different sections of it is colored in different colors, and I’m using a total of four different statuslines - active window, non-active window, active window where the current file belongs to a git repository, and inactive window where the current file belongs to a git repository.

Colorscheme is Neverland.
The plugin for displaying X11 colornames in color is x11colors.vim.