]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Use vertical resize command
authorHiroshi Shirosaki <h.shirosaki@gmail.com>
Fri, 15 Jan 2016 09:04:49 +0000 (18:04 +0900)
committerHiroshi Shirosaki <h.shirosaki@gmail.com>
Fri, 15 Jan 2016 09:04:49 +0000 (18:04 +0900)
We can resize window without changing winwidth option.

ftplugin/markdown.vim

index ae81c804c0d8030748917454ecdd8764be90166f..752aee40b558066e3d3d5febbeabf3742a4c1829 100644 (file)
@@ -347,9 +347,9 @@ function! s:Toc(...)
         vertical lopen
         " auto-fit toc window when possible to shrink it
         if (&columns/2) > l:header_max_len && g:vim_markdown_toc_autofit == 1
-            let &winwidth = (l:header_max_len + 1)
+            execute 'vertical resize ' . (l:header_max_len + 1)
         else
-            let &winwidth = (&columns/2)
+            execute 'vertical resize ' . (&columns/2)
         endif
     elseif l:window_type ==# 'tab'
         tab lopen