Differences

This shows you the differences between the selected revisions of the page.

task_edit 2017-05-15 task_edit 2023-03-08 (current)
Line 1: Line 1:
====== Editing/Opening Files ====== ====== Editing/Opening Files ======
-WinSCP allows you to edit/open remote file using editor or associated application on local machine. To do so it needs to download the remote file to [[temp_folder|temporary directory]] first. Then it opens the file in your preferred editor or associated application. Once you change the file, WinSCP uploads it back. With [[ui_commander|Commander interface]] you can even edit/open local files, but most of this chapter covers editing remote files only.+WinSCP allows you to edit/open remote file using editor or associated application on local machine. To do so it needs to download the remote file to [[temp_folders|temporary directory]] first. Then it opens the file in your preferred editor or associated application. Once you change the file, WinSCP uploads it back. With [[ui_commander|Commander interface]] you can even edit/open local files, but most of this chapter covers editing remote files only.
-To edit file selected in panel go to //File(s) > Edit//. The command by default opens the file in an [[ui_editor|internal editor]]. You can make the command open the file in any external editor in [[ui_pref_editor|preferences]]. From submenu //File(s) > Edit (alternative)// you can open the file in any of configured editors, or even ad hoc editor (//Edit With//). By default the file is also opened in editor when double-clicked((If resolving of symbolic links is disabled or not possible, double-clicking file is always interpreted as attempt to enter it, just in case it is unresolved symbolic link to a directory.)) (this can be changed in [[ui_pref_panels#double-click|preferences]]).+To edit file selected in panel go to //Files > Edit//. The command by default opens the file in an [[ui_editor|internal editor]]. You can make the command open the file in any external editor in [[ui_pref_editor|preferences]]. From submenu //Files > Edit (alternative)// you can open the file in any of configured editors, or even ad hoc editor (//Edit With//). By default the file is also opened in editor when double-clicked((If resolving of symbolic links is disabled or not possible, double-clicking file is always interpreted as attempt to enter it, just in case it is unresolved symbolic link to a directory.)) (this can be changed in [[ui_pref_panels#double-click|preferences]]).
-You can create new empty file using command //File(s) > New > File//. The command asks for name of the new file and then opens your default editor. Note that you can use the command also to open an existing file by typing in its path to avoid need to navigate first to its location. You can also open an existing file this way, or even multiple files by separating their paths with semicolon ('';'').+You can create new empty file using command //Files > New > File//. The command asks for name of the new file and then opens your default editor. Note that you can use the command also to open an existing file by typing in its path to avoid need to navigate first to its location. You can also open an existing file this way, or even multiple files by separating their paths with semicolon ('';'').
-To open selected file in an associated application use //File(s) > Open//. This way you do not need to configure external editor for each file type. However you will not be able to set an additional options.+To open selected file in an associated application use //Files > Open//. This way you do not need to configure external editor for each file type. However you will not be able to set an additional options.
Editing and opening of files can be [[administration|restricted by system administrator]]. Editing and opening of files can be [[administration|restricted by system administrator]].
Line 24: Line 24:
If you choose to edit the same file again during the same session, WinSCP will download it to the same temporary directory as before, allowing the external editor to reload the file content in case it still has it opened (assuming the editor can detect the change). If you choose to edit the same file again during the same session, WinSCP will download it to the same temporary directory as before, allowing the external editor to reload the file content in case it still has it opened (assuming the editor can detect the change).
-One drawback of this approach is that all of the files ever edited by the current instance of WinSCP are kept in a [[temp_folder|temporary directory]] (until WinSCP is closed). WinSCP watches for changes to them all.+One drawback of this approach is that all of the files ever edited by the current instance of WinSCP are kept in a [[temp_folders|temporary directory]] (until WinSCP is closed). WinSCP watches for changes to them all.
If you want to avoid that, you need to make sure that your editor opens each file in a separate window (process). Some editors do that by default while some offer a configuration option for that (see below). If either is the case, then configure your editor as an external editor for WinSCP and enable preference option //[[ui_editor_preferences#external|External editor opens each file in separate window (process)]]//. WinSCP will then treat the file as closed when the editor launched to open it is closed. Note that this setting only affects the "edit" operation. So you may want to make sure that editing is the [[ui_pref_panels#double-click|default operation for double-click]]. If you want to avoid that, you need to make sure that your editor opens each file in a separate window (process). Some editors do that by default while some offer a configuration option for that (see below). If either is the case, then configure your editor as an external editor for WinSCP and enable preference option //[[ui_editor_preferences#external|External editor opens each file in separate window (process)]]//. WinSCP will then treat the file as closed when the editor launched to open it is closed. Note that this setting only affects the "edit" operation. So you may want to make sure that editing is the [[ui_pref_panels#double-click|default operation for double-click]].
Line 43: Line 43:
  * [[resume|Transfer resume support]] is disabled.   * [[resume|Transfer resume support]] is disabled.
-===== Editing from Command-line ===== +===== [[commandline]] Editing from Command-line ===== 
-You can use command line parameter ''[[commandline#operations|/edit]]'' to make WinSCP open a remote file in [[ui_editor|internal editor]]. **This way,** you can for example create a desktop shortcut that opens a remote file as easily as a local one.+You can use command line parameter ''[[commandline#operations|/edit]]'' to make WinSCP open a remote file in [[ui_editor|internal editor]]. This way, you can for example create a desktop shortcut that opens a remote file as easily as a local one.

Last modified: by 202.53.76.82