Copied SmartGotoLine functionality from vim_addon_other.