diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 22:39:54 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 22:39:54 +0000 |
commit | 21cb7d04c387e4198ca8098a884c78b56ffcf4c2 (patch) | |
tree | 84fe5690df1551f0bb2bdfe1a13aacd29ebc1de7 /runtime/doc/usr_29.txt | |
parent | d9c904f85a23a496df4eb6be42aa43f007b22d50 (diff) | |
parent | 4a8bf24ac690004aedf5540fa440e788459e5e34 (diff) | |
download | rneovim-colorcolchar.tar.gz rneovim-colorcolchar.tar.bz2 rneovim-colorcolchar.zip |
Merge remote-tracking branch 'upstream/master' into colorcolcharcolorcolchar
Diffstat (limited to 'runtime/doc/usr_29.txt')
-rw-r--r-- | runtime/doc/usr_29.txt | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/runtime/doc/usr_29.txt b/runtime/doc/usr_29.txt index 751cb9a902..dd8598a3a0 100644 --- a/runtime/doc/usr_29.txt +++ b/runtime/doc/usr_29.txt @@ -307,9 +307,9 @@ tags file. Example: > :psearch popen This will show the "stdio.h" file in the preview window, with the function -prototype for popen(): +prototype for popen(): >c - FILE *popen __P((const char *, const char *)); ~ + FILE *popen __P((const char *, const char *)); You can specify the height of the preview window, when it is opened, with the 'previewheight' option. @@ -319,13 +319,13 @@ You can specify the height of the preview window, when it is opened, with the Since a program is structured, Vim can recognize items in it. Specific commands can be used to move around. - C programs often contain constructs like this: + C programs often contain constructs like this: >c - #ifdef USE_POPEN ~ - fd = popen("ls", "r") ~ - #else ~ - fd = fopen("tmp", "w") ~ - #endif ~ + #ifdef USE_POPEN + fd = popen("ls", "r") + #else + fd = fopen("tmp", "w") + #endif But then much longer, and possibly nested. Position the cursor on the "#ifdef" and press %. Vim will jump to the "#else". Pressing % again takes @@ -361,7 +361,7 @@ MOVING IN CODE BLOCKS In C code blocks are enclosed in {}. These can get pretty long. To move to the start of the outer block use the "[[" command. Use "][" to find the end. This assumes that the "{" and "}" are in the first column. - The "[{" command moves to the start of the current block. It skips over + The [{ command moves to the start of the current block. It skips over pairs of {} at the same level. "]}" jumps to the end. An overview: @@ -410,7 +410,7 @@ That also works when they are many lines apart. MOVING IN BRACES -The "[(" and "])" commands work similar to "[{" and "]}", except that they +The [( and ]) commands work similar to [{ and ]}, except that they work on () pairs instead of {} pairs. > [( @@ -424,7 +424,7 @@ work on () pairs instead of {} pairs. MOVING IN COMMENTS To move back to the start of a comment use "[/". Move forward to the end of a -comment with "]/". This only works for /* - */ comments. +comment with "]/". This only works for `/* - */` comments. > +-> +-> /* | [/ | * A comment about --+ @@ -446,10 +446,10 @@ You are editing a C program and wonder if a variable is declared as "int" or Vim will list the matching lines it can find. Not only in the current file, but also in all included files (and files included in them, etc.). The result -looks like this: +looks like this: > - structs.h ~ - 1: 29 unsigned column; /* column number */ ~ + structs.h + 1: 29 unsigned column; /* column number */ The advantage over using tags or the preview window is that included files are searched. In most cases this results in the right declaration to be found. |