Mercurial > vim
comparison runtime/doc/if_pyth.txt @ 4704:542af01979be v7.3.1099
updated for version 7.3.1099
Problem: Python: Changing directory with os.chdir() causes problems for
Vim's notion of directories.
Solution: Add vim.chdir() and vim.fchdir(). (ZyX)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 02 Jun 2013 18:20:17 +0200 |
parents | 0c25fa1dfd97 |
children | 2b11ac90d9e9 |
comparison
equal
deleted
inserted
replaced
4703:2d9d2b3b10b8 | 4704:542af01979be |
---|---|
177 or |Dictionary|) or call (|Funcref|) vim objects. | 177 or |Dictionary|) or call (|Funcref|) vim objects. |
178 | 178 |
179 vim.strwidth(str) *python-strwidth* | 179 vim.strwidth(str) *python-strwidth* |
180 Like |strwidth()|: returns number of display cells str occupies, tab | 180 Like |strwidth()|: returns number of display cells str occupies, tab |
181 is counted as one cell. | 181 is counted as one cell. |
182 | |
183 vim.chdir(*args, **kwargs) *python-chdir* | |
184 vim.fchdir(*args, **kwargs) *python-fchdir* | |
185 Run os.chdir or os.fchdir, then all appropriate vim stuff. | |
186 Note: you should not use these functions directly, use os.chdir and | |
187 os.fchdir instead. Behavior of vim.fchdir is undefined in case | |
188 os.fchdir does not exist. | |
182 | 189 |
183 Error object of the "vim" module | 190 Error object of the "vim" module |
184 | 191 |
185 vim.error *python-error* | 192 vim.error *python-error* |
186 Upon encountering a Vim error, Python raises an exception of type | 193 Upon encountering a Vim error, Python raises an exception of type |