Jump to content

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.
 
Link to comment
  • Level 5*

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?

Link to comment
  • Level 5*

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.

Link to comment
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

Link to comment
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. 

Link to comment
  • Level 5*
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

Link to comment
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.

Link to comment
  • Level 5*
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

Link to comment
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.

Link to comment
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

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...