vim-Filter commands
命令也被稱作是motion
檢視該命令的幫助資訊:
:help !
Filter commands
資訊過濾 (filter)
!==>tell vim to performing a filter operation
!5G -> 從游標下向下5行執行過濾程式 (tell vim to start filter under cursor and go down 5 lines)
:.,.+4!
:10,15!sort -> 只在檔案的第10行到第15行之間執行 (sort between line 10 to 15)
!! -> (filter the current line)
:.,$!sort (sort from current line to end)
!!date -> 插入當前時間 (insert current date)
A filter is a program that accepts text at standard input, changes it in some
way, and sends it to standard output. You can use the commands below to send
some text through a filter, so that it is replace by the filter output.
Examples of filters are "sort", which sorts lines alphabetically, and
"indent", which formats C program files (you need a version of indent that
works like a filter; not all versions do). The 'shell' option specifies the
shell Vim uses to execute the filter command (See also the 'shelltype'
option). You can repeat filter commands with ".". Vim does not recognize a
comment (starting with '"') after the ":!" command.
:! -> 直接執行shell中的一個外部命令 (call any external program)
檢視該命令的幫助資訊:
:help !
Filter commands
資訊過濾 (filter)
!==>tell vim to performing a filter operation
!5G -> 從游標下向下5行執行過濾程式 (tell vim to start filter under cursor and go down 5 lines)
:.,.+4!
:10,15!sort -> 只在檔案的第10行到第15行之間執行 (sort between line 10 to 15)
!! -> (filter the current line)
:.,$!sort (sort from current line to end)
!!date -> 插入當前時間 (insert current date)
A filter is a program that accepts text at standard input, changes it in some
way, and sends it to standard output. You can use the commands below to send
some text through a filter, so that it is replace by the filter output.
Examples of filters are "sort", which sorts lines alphabetically, and
"indent", which formats C program files (you need a version of indent that
works like a filter; not all versions do). The 'shell' option specifies the
shell Vim uses to execute the filter command (See also the 'shelltype'
option). You can repeat filter commands with ".". Vim does not recognize a
comment (starting with '"') after the ":!" command.
:! -> 直接執行shell中的一個外部命令 (call any external program)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/20747382/viewspace-2130324/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Mainframe CommandsAI
- linux commandsLinux
- Useful Oracle RAC CommandsOracle
- Postgres Basic Commands for Beginners
- Three commands for OCR maintenanceAINaN
- [Bash] while & until commandsWhile
- [Bash] ps & pgrep commands
- List Available DBCC CommandsAI
- xecuting shell commands with bash
- 測試laravel commands的方法Laravel
- Basic LINUX/UNIX Commands(轉)Linux
- Vim tips——Working with external commands
- Python commands獲取程式idPython
- [轉]Handy adb commands for AndroidAndroid
- mysql 使用 informatin_schema tables 建立 shell commandsMySqlORM
- pipe-out-from-a-sequence-of-commands to sqlplusSQL
- ios-Multiple commands produced error xcode 10 [duplicate]iOSErrorXCode
- 常用sql commands以及mysql問題解決日誌MySql
- android開發筆記之ADB Shell CommandsAndroid筆記
- 程式設計師開發利器:Your Commands網站上線程式設計師網站
- PRKC-1002: All the submitted commands did not execute successfullyMIT
- 開發WP7專案的好工具: Windows Phone CommandsWindows
- 解決使用者認證腳手架命令 no commands defined in the "ui" namespace 的問題UInamespace
- 在iOS專案中依賴Flutter Module-④報錯Multiple commands produce/[CP] Embed Pods FrameworksiOSFlutterFramework
- cron計劃任務開啟成功,但是詭異的是顯示No scheduled commands are ready to run.