2016年4月1日 星期五

[IDE] Sublime text 3 , editing config for myself. Tabs to spaces, trim white space when save, draw white sapce for notice.



1. go to  submits -> preferences -> settings - user

copy and pasted below config.


{
    "draw_white_space": "all",
    "font_size": 14,
    "translate_tabs_to_spaces": true,
    "trim_trailing_white_space_on_save": true,
    "auto_match_enabled": false,
    "use_tab_stops": false
}



2.  TrailingSpaces-master package.
Optional: highlight the white space with red color.
 (But in fact, space will be trim when you save file as above setting.)

Go to github to download the zip file for whole project on the right buttom

https://github.com/SublimeText/TrailingSpaces

then extract that and you can see the folder  TrailingSpaces-master.

Go Submits =>Preferences => Browser Packages

Then move the folder TrailingSpaces-master in to the folder which Submits jumped out.

Which means you should pasted TrailingSpaces-master folder in to

sublimes-text-3/Packages/

and place with the /sublimes-text-3/Packages/User folder together.


It will seem like....


xxxx:~/.config/sublime-text-3/Packages$ pwd
/home/xxxx/.config/sublime-text-3/Packages

xxxx:~/.config/sublime-text-3/Packages$ ll
total 24
drwx------  6 xxxx xxxx 4096  3月 22 14:43 ./
drwx------  7 xxxx xxxx 4096  3月 15 17:29 ../
drwxrwxr-x 11 xxxx xxxx 4096  3月 22 14:43 bz2/
drwxr-xr-x  7 xxxx xxxx 4096  3月 15 17:32 ssl-linux/
drwxrwxr-x  3 xxxx xxxx 4096 10月 27 22:54 TrailingSpaces-master/
drwx------  3 xxxx xxxx 4096  3月 29 09:52 User/



You are good to go.





沒有留言:

張貼留言