Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

ViM: Always Maximized

📅 2010-Nov-17 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ vim, vimrc ⬩ 📚 Archive

As I increasingly try to work in a distraction-free mode, I find myself using applications with their windows** maximized. To make ViM** always open its window maximized, add this command to your vimrc file:

autocmd GUIEnter * simalt ~x

autocmd is used to add a command to ViM that is triggered on a certain event. The event here is GUIenter, which is the event of opening a ViM window. The * represents the files on which to trigger the command, which is all files for our case. simalt ~x is the Alt-Space + x command, the command to trigger on the window open event. That is, Alt-Space which shows the control menu of the window in Windows, followed by x, which chooses the Maximize option.


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧