Use CTRL-SHIFT-A to Copy current filename to clipboard or CTRL-SHFIT-X to insert file name at current position.
'atom-text-editor':
'ctrl-shift-a': 'amirhp-com:copy-file-name'
'ctrl-shift-x': 'amirhp-com:insert-file-name'
path = require 'path'
atom.commands.add 'atom-text-editor', 'amirhp-com:copy-file-name', ->
return unless editor = atom.workspace.getActiveTextEditor()
selection = editor.getLastSelection()
filename = atom.workspace.getActivePaneItem().getPath().split(path.sep).pop()
atom.clipboard.write(filename)
atom.notifications.addSuccess('Copied "'+filename+'" to Clipboard!', {detail: false, dismissable: false, icon: "check"})
atom.commands.add 'atom-text-editor', 'amirhp-com:insert-file-name', ->
return unless editor = atom.workspace.getActiveTextEditor()
selection = editor.getLastSelection()
filename = atom.workspace.getActivePaneItem().getPath().split(path.sep).pop()
editor.insertText(filename)
atom.notifications.addSuccess('Filename "'+filename+'" inserted!', {detail: false, dismissable: false, icon: "check"})
Finnaly, press CTRL-SHIFT-F5 to reload and activate.