Use pwd command for current directory
The pwd command returns the current directory so you can embed it in your command line:
gedit admin://$(pwd)/rootfilename
Choose a different method
As this question Which best practice for using gedit as root? points out:
My researchs brought me these proposals, are they equivalent or to be
rejected :
You are using option 2 but I prefer option 4 sudo -H gedit which allows relative path when editing a root owned file.
Edit directly from Nautilus
If you are using Nautilus consider the extension Edit as Administrator which dramatically improves your workflow:

Use your user profile for gedit
The problem with gedit as root is you loose your theme colors, font size, tab settings, line wrap settings, and plug-ins. I wrote a script called sgedit (sudo gedit) that solves that problem.
In the animation below the gedit plug-in shows thumbnail overview of document on the right pane. Grab the slider mini-window with a mouse Left Click and drag it down to quickly locate sections in the document.
Other user settings for theme, font size, line wrapping, tab stop settings, convert tabs to spaces, and all your regular user profile plug-ins are available when running as sudo.
