Jump to content
Dark Mode is here Read more... ×
kinshuk4

Using tab to indent the code snippet

Recommended Posts

Hi Evernote Team,

    I am using evernote on Mac with version 6.13.3. I have a request. I use ``` to put the code in it. For example, see below.

while (s.empty() == false) {
top = s.top();
s.pop();
mark top as visited;
check for termination condition (have we reached the target node?)
add all of top’s unvisited neighbors to the stack.
}
 
Now I want to add tabs to it to look better:
while (s.empty() == false) {
        top = s.top();
        s.pop();
        mark top as visited;
        check for termination condition (have we reached the target node?)
        add all of top’s unvisited neighbors to the stack.
}
 
To fix this code, I have to go to each line and press tab. Which is kind of painful. I know I can go to some other editor and make it work, like this:
Generally, the other way round is that I select the lines I want to indent and press tab.  
 
Can you please provide this feature, so that I don't have to leave Evernote window for this task. Thanks.
 

Share this post


Link to post

Which Evernote client are you using? Windows? Mac?

  • Like 1

Share this post


Link to post

Hi.  Quite a few coders have asked for this sort of functionality,  and Evernote have responded by adding a 'code block' feature (the curly brackets option on the toolbar).  It is possible to multi select lines and use tab and text indent within the code block.  Are you asking for something more,  or different?

Share this post


Link to post

In general, in the Windows client at least, the Tab key just inserts several spaced unless you're in a bulleted or numbered list, in which case it indents. So if you have a selection, a tab will replace the selection with several space characters unless it's in a list. Ctrl+M and Ctrl+Shift+M will indent and outdent anywhere, though.

Share this post


Link to post
23 hours ago, jefito said:

Which Evernote client are you using? Windows? Mac?

Hi Jefito,

   I am using Mac with evernote version 6.13.3. Thanks.

Share this post


Link to post
23 hours ago, gazumped said:

Hi.  Quite a few coders have asked for this sort of functionality,  and Evernote have responded by adding a 'code block' feature (the curly brackets option on the toolbar).  It is possible to multi select lines and use tab and text indent within the code block.  Are you asking for something more,  or different?

Hi Gazumped,

   Thanks for the reply. I am using mac, and I am unable to see such option. Please find the snap where I am unable to see the curly braces, though it could be that I have missed it. I am using evernote 6.13.3 on mac.

Here is the toolbar:

5a64a7bb2ef3f_Screenshot2018-01-2115_42_46.thumb.png.3f92744c578106a95736c373e070f05e.png

Please guide me how I can use it.

 

Regards,

Kinshuk

Share this post


Link to post
1 hour ago, kinshuk4 said:

Thanks for the reply. I am using mac, and I am unable to see such option. Please find the snap where I am unable to see the curly braces, though it could be that I have missed it. I am using evernote 6.13.3 on mac.

It doesn't exist in the Mac version - I'm using the Mac App Store version here - at the moment. It does, however, exist in the web version. 

Share this post


Link to post
1 hour ago, kinshuk4 said:

Hi Gazumped,

   Thanks for the reply. I am using mac, and I am unable to see such option. Please find the snap where I am unable to see the curly braces, though it could be that I have missed it. I am using evernote 6.13.3 on mac.

Here is the toolbar:

5a64a7bb2ef3f_Screenshot2018-01-2115_42_46.thumb.png.3f92744c578106a95736c373e070f05e.png

Please guide me how I can use it.

 

Regards,

Kinshuk

The icon appears between the highlighter and bullet list in the Windows version.  Need someone from the Mac universe to explain why it is missing from your toolbar.

ScreenClip.png.7a55001f326a36a0c2f5e446d7d269cf.png

Share this post


Link to post
9 hours ago, CalS said:

The icon appears between the highlighter and bullet list in the Windows version.  Need someone from the Mac universe to explain why it is missing from your toolbar.

ScreenClip.png.7a55001f326a36a0c2f5e446d7d269cf.png

Thanks CaIS, I will wait for the option to be appearing in Mac version. I am using direct site version.

  • Like 1

Share this post


Link to post
On 2018-01-20 at 2:14 AM, kinshuk4 said:

To fix this code, I have to go to each line and press tab. Which is kind of painful. I know I can go to some other editor and make it work

Evernote has an indent feature for lists, but not for text

My solution would be "some other editor" that supports code with indentation and syntax highlighting
 
I use the Textastic app, and add the document as a note attachment
 
> I will wait for the option to be appearing in Mac version. I am using direct site version.
5a65580ee7af0_ScreenShot2018-01-21at18_04_56.png.cc061034f2b32fdf547b0de6909f2a53.png
 
There is no menu bar icon on the Mac
I use Format > Style > Code Block

Note: This has to be enabled in Preferences
5a65590b462f6_ScreenShot2018-01-21at18_04_30.png.facaf9e4425b6a0af096a4d573a6bdf8.png

  • Like 1

Share this post


Link to post
1 hour ago, kinshuk4 said:

Thanks CaIS, I will wait for the option to be appearing in Mac version. I am using direct site version.

You are welcome.

Share this post


Link to post
6 hours ago, DTLow said:

Evernote has an indent feature for lists, but not for text

My solution would be "some other editor" that supports code with indentation and syntax highlighting
 
I use the Textastic app, and add the document as a note attachment
 
> I will wait for the option to be appearing in Mac version. I am using direct site version.
5a65580ee7af0_ScreenShot2018-01-21at18_04_56.png.cc061034f2b32fdf547b0de6909f2a53.png
 
There is no menu bar icon on the Mac
I use Format > Style > Code Block

Note: This has to be enabled in Preferences
5a65590b462f6_ScreenShot2018-01-21at18_04_30.png.facaf9e4425b6a0af096a4d573a6bdf8.png

That is great. I will try using it :) Thank you.

Share this post


Link to post
On 22/01/2018 at 4:04 AM, CalS said:

You are welcome.

Hi CaIS,

   I checked the codeblock option and when i press tab in it, it removes the line rather than putting the tab. so it didn't worked. Thanks for the help though.

 

Thanks,

Kinshuk

  • Like 1

Share this post


Link to post

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

×