Skip to content

Instantly share code, notes, and snippets.

View iliojunior's full-sized avatar

Ilio Adriano de Oliveira Junior iliojunior

  • MATERA Systems
  • Maringá - PR, Brazil
View GitHub Profile
@iliojunior
iliojunior / init.coffee
Last active July 11, 2019 13:58 — forked from tribou/init.coffee
Customize Atom tab titles to display folder and file name
# Just create 'init.coffee' in your .atom directory
# Add folder and filename to tab title
# Suggested when using many 'index.js'
# When the file name is 'index.js' it uses the last two paths
# EX: src/components/pages/Domain/SubDomain/index.js -> Domain/SubDomain
atom.workspace.observeTextEditors (editor) ->
if editor.getTitle() isnt "untitled"
pathNames = editor.getPath().split('/')
length = pathNames.length
title = pathNames[length - 1]