book
  • README
  • cheatsheet
    • bash
      • builtin
      • syntactic sugar
      • cmd
      • havefun
    • text-processing
      • awk
      • sed
      • html
      • json
      • regex
      • unicode
    • osx
    • curl
    • tricky
    • widget
    • proxy
    • colors
    • math
    • media
    • ssl
      • keystore
      • verification
      • server
      • client
      • tricky
    • windows
      • powershell
      • choco
      • wsl
      • wt
      • shortcut
      • clsid
      • env
      • shell:folder
  • vim
    • nvim
    • install
    • color
    • plugins
      • usage
      • other plugins
      • deprecated
    • tricky
    • viml
    • windows
    • troubleshooting
  • devops
    • admin tools
    • ssh
    • git
      • config
      • alias
      • submodule
      • eol
      • example
      • gerrit
        • gerrit API
      • github
      • troubleshooting
      • tricky
      • statistics
    • pre-commit
    • release-tools
    • tmux
      • cheatsheet
    • ansible
    • vault
    • artifactory
      • api
      • cli
      • aql
      • nginx cert
    • klocwork
      • kwadmin
      • kwserver
      • api
      • q&a
    • elk
    • mongodb
    • android
    • mobile
  • jenkins
    • config
      • windows
    • appearance
    • troubleshooting
    • jenkinsfile
      • utility
      • parallel
      • build
      • envvar
      • properties
      • trigger
      • node
    • script
      • job
      • build
      • stage
      • agent
      • security & authorization
      • exception
      • monitor
      • tricky
    • api
      • blueocean
    • cli
    • plugins
      • kubernetes
      • docker
      • shared-libs
      • lockable-resource
      • ansicolor
      • badge
      • groovy-postbuild
      • simple-theme
      • customizable-header
      • artifactory
      • jira-steps
      • job-dsl
      • build-timeline
      • crumbIssuer
      • coverage
      • uno-choice
      • tricky
  • virtualization
    • kubernetes
      • init
        • kubespray
        • kubeadm
          • environment
          • crio v1.30.4
          • docker v1.15.3
          • HA
        • addons
        • etcd
      • kubectl
        • pod
        • deploy
        • replicasets
        • namespace
        • secrets
      • node
      • certificates
      • events
      • kubeconfig
      • kubelet
      • troubleshooting
      • cheatsheet
      • auth
      • api
      • tools
        • monitor
        • helm
        • network
        • minikube
    • docker
      • run & exec
      • voume
      • remove
      • show info
      • dockerfile
      • dockerd
      • tricky
      • troubleshooting
      • windows
    • crio
    • podman
  • ai
    • prompt
  • osx
    • apps
      • init
      • brew
    • defaults
    • system
    • network
    • script
    • tricky
  • linux
    • devenv
    • util
      • time & date
      • output formatting
      • params
      • tricky
    • nutshell
    • disk
    • network
    • troubleshooting
    • system
      • apt/yum/snap
      • authorization
      • apps
      • x11
    • ubuntu
      • systemctl
      • x
    • rpi
  • programming
    • groovy
    • python
      • config
      • basic
      • list
      • pip
      • q&a
    • others
    • archive
      • angular
      • maven
      • mysql
        • installation
        • logs
      • ruby
        • rubyInstallationQ&A
  • tools
    • fonts
    • html & css
    • Jira & Confluence
    • node & npm
      • gitbook
      • hexo
      • github.page
      • code themes
    • app
      • microsoft office
      • vscode
      • virtualbox
      • iterm2
      • browser
      • skype
      • teamviewer
      • others
  • quotes
  • english
Powered by GitBook
On this page
  • open command in a new window
  • move between windows
  • resize
  • quickfix

Was this helpful?

  1. vim

windows

PreviousvimlNexttroubleshooting

Last updated 2 months ago

Was this helpful?

reference:

    • :only

open command in a new window

[!TIP|label:reference:]

  • n CTRL-W_n CTRL-W_CTRL-N :[N]new :new Create a new window and start editing an empty file in it. Make new window N high (default is to use half the existing height). Reduces the current window height to create room (and others, if the option is set and isn't "hor"). Also see and . If is not empty, the first format given will be used for the new buffer. If is empty, the of the current buffer is used. This can be overridden with the argument. Autocommands are executed in this order:

    1. for the current

    2. for the new

    3. for the current buffer

    4. for the new buffer This behaves like a "" first, and then an "" command.

" :[N]new [++opt] [+cmd] {file}

:<n>command +<command>
" |    |        + the command will be execute
" |    + command to create new window. i.e.: new, vnew, split/sp, vsplit/vsp
" + line number or column number

move between windows

COMMANDS
SHORTCUT

:wincmd l

ctrl + w ⇢ l

:wincmd h

ctrl + w ⇢ h

:wincmd j

ctrl + w ⇢ j

:wincmd k

ctrl + w ⇢ k

:wincmd r

ctrl + w ⇢ r

resize

[!NOTE|label:reference:]

  • maximium split window: ctrl + w ⇢ _

  • maximium vsplit window: ctrl + w ⇢ |

  • resize window: ctrl + w ⇢ |

horizontal resize

:res is the shortcut of :resize

COMMANDS OR SHORTCUT
COMMENTS

:res[ize] n

setup the width to lines

:res[ize] -n

reduce lines of the width

:res[ize] +n

extend lines of the width

ctrl + w ⇢ +

extend 1 line

:wincmd +

extend 1 line

ctrl + w ⇢ -

reduce 1 line

:wincmd -

reduce 1 line

ctrl + w ⇢ =

resize to default: 50%

:wincmd =

resize to default: 50%

ctrl + w ⇢ _

maximum the window

:wincmd _

maximum the window

vertical resize

COMMANDS OR SHORTCUT
COMMENTS

:vertical res[ize] n

setup the width to columns

:vertical res[ize] -n

reduce columns of the width

:vertical res[ize] +n

extend columns of the width

ctrl + w ⇢ >

extend 1 column

:wincmd >

extend 1 column

ctrl + w ⇢ <

reduce 1 column

:wincmd <

reduce 1 column

ctrl + w ⇢ =

resize to default: 50%

:wincmd =

resize to default: 50%

ctrl + w ⇢ |

maximum the window

:wincmd ⎮

maximum the window

  •  .vimrc
    au FileType qf call AdjustWindowHeight(3, 10)
    function! AdjustWindowHeight(minheight, maxheight)
      exe max([min([line("$"), a:maxheight]), a:minheight]) . "wincmd _"
    endfunction

Resize splits more quickly
quickfix
automatically fitting a quickfix window height
windows.txt
Maximize current window
Maximize or restore window
Maximize or set initial window size
Maximize window and return to previous split structure
Quick window resizing
Window zooming convenience
windows.txt - new
CTRL-W
CTRL-W
CTRL-N
[++opt]
[+cmd]
'equalalways'
'eadirection'
++opt
+cmd
'fileformats'
'fileformats'
'fileformat'
++opt
WinLeave
window
WinEnter
window
BufLeave
BufEnter
:split
:enew
open command in a new window
move between windows
resize
horizontal resize
vertical resize
quickfix
n-new-command
split resize
vertical split resize
quickfix windows