Jump to content

Is it possible to set tab size to 4 spaces?


Recommended Posts

Posted

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!!

  • Level 5*
Posted

Hi.  No,  it is not possible to set tab size.  Are you using a code block when copying code into a note?  If you can save a file in VScode,  try attaching a VScode file to your note.

Posted
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
Posted
在 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.

  • Level 5*
Posted
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.

Posted
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

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...