Sublime Forum

Switching between VIM and Sublime

#1

Hello,

I recently started using sublime (which I am enjoying a lot). I found out that all the code formatting I had done to my files (like, 2 space indentation, 80 character rulers etc), was all over the place when I opened the same document in VIM. I understand that these two editors are different, but was wondering if I can do something about it?

Many of my team mates use vim and if someone opens my code which was formatted using sublime, I don’t want them to see an ugly formatting. Has anyone faced similar issue?

Thank you.

0 Likes

#2

Set your tab size to what you like in the preferences:

"tab_size": 2,
"translate_tabs_to_spaces": true,

And expand your tabs to spaces. It is an option in the bottom status bar when you click on the “Spaces: 2” item. Vim by default doesn’t use tab characters, but inserts the appropriate number of spaces.

After that, all your documents should be move-able between the two programs just fine. It works for me.

0 Likes

#3

@raguay Thanks! That worked! :slightly_smiling:

0 Likes