
我正在開始使用 vim 進行降價。
* Level 1 text
* On pressing enter it comes here
* On pressing tab it comes here
我想要的是,我想使用按鍵修改(增加或減少)項目符號點的層級。 (在其他文字編輯器中,增加或減少Tab
意圖等級)Shift+Tab
* Level 1 bullet. On pressing Enter,
* It comes here. On pressing Enter and then Tab,
* I want it to come here. To go to the previous level, on pressing Enter and then Enter/Shift+Tab,
* I want it to come here.
這是 VS Code 中的行為。
搜尋後,我添加了set ai
和filetype indent on
到我的空.vimrc
(剛剛按照說明安裝了 Vundle),但我沒有成功。
我怎樣才能完成這項工作?
答案1
Vim 有不同的哲學。
在正常模式下,按>
兩次可新增縮進,<
按兩次可刪除。若要對多行執行此操作,請使用 進入視覺模式v
並選擇行,然後按>
或<
兩次。
在插入模式下,您可以按ctrl-d
刪除縮排。
set ai
在這裡不起作用,因為 vim 無法猜測與程式碼相比你在 markdown 想要什麼縮排。
答案2
經過一番研究,我發現這個 Vim 外掛可以對 Markdown 檔案執行預期的行為。
這是相同內容的連結:加布里埃拉納