Jump to content

Is it possible to set tab size to 4 spaces?


Recommended Posts

How to set the tab size? I've googled and googled, and searched in this evernote forum, didn't find.

When I copy my programming code from VSCode, one tab becomes 8 spaces width. And when there are 4 tabs, it becomes 32 spaces width!!

Link to comment
15 hours ago, ronrun said:

How to set the tab size? I've googled and googled, and searched in this evernote forum, didn't find.

When I copy my programming code from VSCode, one tab becomes 8 spaces width. And when there are 4 tabs, it becomes 32 spaces width!!

I just tested it with my Rust code,  it's perfectly copied in a code block in my note (4 spaces)

  • Like 1
Link to comment
在 2022/8/24 在 AM1點36分, eric99說:

I just tested it with my Rust code,  it's perfectly copied in a code block in my note (4 spaces)

Ok, I found that from vscode, a tab becomes 4 spaces. But from notepad++, it becomes 8 spaces. The source is one tab, but the result is different. And I use notepad++ very often.

Link to comment
  • Level 5*
4 hours ago, ronrun said:

The source is one tab, but the result is different. And I use notepad++ very often.

Your original post specified VScode.  And it's still not possible to alter the tab conversion - the 'transfer' between two different coding systems apparently generates some anomalies.  Save the notepad++ file as an attachment and open it in the app to see your code.

Link to comment
22 hours ago, ronrun said:

Ok, I found that from vscode, a tab becomes 4 spaces. But from notepad++, it becomes 8 spaces. The source is one tab, but the result is different. And I use notepad++ very often.

in the Notepad++ preferences Language -> Tab Settings -> Replace by space on

You can still uses tabs, but they are replaced by spaces underneath. This solves your copy/paste problem for any editor without the need to change the tab size every time you import from another source with different tab size.

Screenshot_-_26_aug__11_50_a_m_.png

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...