Show node IDs along with titles in Entity reference Autocomplete list I'll like to add this functionality to the autocomplete widget in Entityreference field to show node ID next to the titles in the dropdown list. The reason behind the idea is to differentiate between multiple nodes with same title.

Example: 


This is a title (3)
This is a title (2)
This is a title (1)


I know the node ID is shown once a selection is made but I like to show it in the dropdown list in order to pick the right node quickly based on the node ID.
Install the Views and Entity Reference modules, create a new View and Add a Entity Reference Display:



Then Add in the fields the content title and the nid, click in the nid and check Exclude from display, Save and click in the title and go to rewrite the output of the title as [title] - ([nid])




Go to edit the settings of the format and check the title, this will allow you to search by title.



Save the view.

Go to edit your Entity Reference field and select in the Mode Views: .... (like the following image) and select your View (in this case the name is: articles_with_id) and save the settings:



Then go to see the result:



EDIT: This is now working in Drupal 8, at least in the version 8.3.4.