opening more than one file split vertically through emacs -nw

前端 未结 2 1802
广开言路
广开言路 2021-02-09 04:48

Using emacs -nw file1 file2 I can open multiple files at once. However, emacs will open them in horizontal splits. Is there a way to set default split behavior to v

2条回答
  •  南方客
    南方客 (楼主)
    2021-02-09 05:15

    In your init file, add the toggle-window-split function code. Then, add the following line of code to your init file:

    (add-hook 'emacs-startup-hook 'toggle-window-split)
    

    This will call the toggle-window-split function automatically every time you startup emacs. If you startup emacs with 2 files on the command line, they will be displayed in vertical splits.

提交回复
热议问题