Search code examples
atom-editorshortcut

Atom editor end of line shortcut (without end button)


In my laptop keyboard I can move cursor to end of line by pressing FN + right arrow buttons. Now I am coding on a desktop and this keyboard doesn't have that combination. I can move cursor to end of line by pressing "END" button but I don't want to use END button I just want to add this functionality to a similar combination what I had in my other keyboard. So I am looking a way to create shotcut to press ALT + Right Arrow to make same functionality as END button. Is there any way to do that ?

Thanks.


Solution

  • After reading all documentation and making some tries I found out how to move cursor end of the line.

    First go to File -> Keymap this will open keymap.cson file on here just add codes under 'atom-text-editor'. It will look like as below.

    'atom-text-editor':
        'alt-right': 'editor:move-to-end-of-line'
        'alt-left': 'editor:move-to-beginning-of-line'
    

    So now you can move your cursor end of line by pressing ALT + Right or visa versa.