SORU
21 Ocak 2011, Cuma


Nasıl's `J` ve `Vim gq` komutları bir boşluk bir süre sonra yararlanabilir miyim?

Vim kullanırken J komut, en çizgiler Dolgu için tek bir boşluk ile birleştirilir. Ama bir süre sonra Vim her zaman iki boşluk kullanır. Aşağıdaki örnek alalım:

This ends with a comma,
but this ends with a period.
Join with 'J' and what do you get?

Benim için, bir sonucu olarak ortaya

This ends with a comma, but this ends with a period.  Join with 'J' and what do you get?

Bir boşluk, sonra virgül, nokta iki. Eğer gq komutu ile paragraf biçimlendirmek aynı hikaye.

Sadece bir boşluk döneminden sonra Vim kullanmak için değiştirme yapabileceğim bir ayar var mı?

CEVAP
21 Ocak 2011, Cuma


:help joinspaces


'joinspaces' 'js'    boolean    (default on)
            global
            {not in Vi}
    Insert two spaces after a '.', '?' and '!' with a join command.
    When 'cpoptions' includes the 'j' flag, only do this after a '.'.
    Otherwise only one space is inserted.
    NOTE: This option is set when 'compatible' is set.

Yani, yaparsın

:set nojoinspaces

ne arzu elde etmek.

Alternatif olarak, bu ayar ile geçiş yapabilirsiniz

:set joinspaces!

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Commander Chalkboard

    Commander Ch

    20 Ocak 2014
  • fireflame65

    fireflame65

    27 Mart 2007
  • NikkoNantone

    NikkoNantone

    21 Kasım 2011