Browse Source

Modify shrink command to shrink first dash only

DricomDragon 5 years ago
parent
commit
7136b808e5
1 changed files with 5 additions and 3 deletions
  1. 5 3
      Guides/ics-vim.md

+ 5 - 3
Guides/ics-vim.md

@@ -16,17 +16,19 @@ After :
 SUMMARY:TP - CCUBE - C000
 ```
 
-## Shrink dash
+## Shrink first dash
 
-Command vim : `:%s/ - /,/g`
+Command vim : `:%s/ - \(.*\) \?\(-\?\) \?/,\1\2/g`
 
 Before :
 ```
 SUMMARY:TP - CCUBE - C000
+SUMMARY:CM - CCUBE
 ```
 
 After :
 ```
-SUMMARY:TP,CCUBE,C000
+SUMMARY:TP,CCUBE - C000
+SUMMARY:CM,CCUBE
 ```