{"revision": {"id": "f33e6675-2f95-11f1-8f67-e86a64d24d78", "node_id": "f33d4f88-2f95-11f1-821d-e86a64d24d78", "user_id": "edc3f576-2f95-11f1-900f-e86a64d24d78", "author": "foxhop", "data": "Vim Tips and Tricks\r\n========================\r\n\r\n.. contents::\r\n\r\nAs I learn more about vim, I plan to document the tips and tricks I learn here.\r\n\r\n\r\nhow to set tab to 4 spaces in vim\r\n-----------------------------------------\r\n\r\nAdd the following into your .vimrc file:\r\n\r\n.. code-block:: vim\r\n\r\n    set tabstop=4\r\n    set shiftwidth=4\r\n    set expandtab\r\n\r\nhow to set replace all tabs with a space\r\n-----------------------------------------\r\n\r\n.. code-block:: vim\r\n\r\n    :%s/\\t/ /g\r\nvimdiff or hg merge\r\n-----------------------\r\n\r\nThis is a list of some common commands when using vimdiff:\r\n\r\nctrl w (twice)\r\n switch windows\r\n\r\n|\r\n\r\ndo\r\n diff obtain, take the other window's differences. Pull the change.\r\n\r\n|\r\n\r\ndp\r\n diff put, give the other window our differences. Push the change.\r\n\r\n|\r\n\r\n[c\r\n move focus to previous difference.\r\n\r\n|\r\n\r\n]c\r\n move focus to next difference.\r\n\r\n|\r\n\r\n:diffupdate\r\n diff update \r\n\r\n|\r\n\r\n:diffget <window number>\r\n get changes from specified window number and place them into current window.\r\n\r\n|\r\n\r\n:diffput <window number>\r\n put changes from current window into specified window number.\r\n\r\n|\r\n\r\nzo\r\n open folded text\r\n\r\n|\r\n\r\nzc\r\n close folded text\r\n\r\n|", "source_format": "rst", "revision_number": 9, "created": 1312492043000}}