Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first submission of cheat sheet #2

Merged
2 commits merged into from Nov 23, 2010
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
42 changes: 42 additions & 0 deletions VimOrganizerCheatsheet.org
@@ -0,0 +1,42 @@
* VimOrganizer CheatSheet
** Outline Navigation
TAB toggle of levels
Shift-TAB global toggle of levels
,1 show level one
,2 show level 2
...
,8 show level 4
,9 show level 9
** Basic Outline Editing
Enter add another headline of same level
Shift+Enter add another headline of lower-level
Ctrl+Enter add another headline of higher-level
o add body text on current level
O add body text on previous level above
:=G re-formats and indents whole document
if run from first line of document
** Time Stamps
,dd enter deadline date
,ds enter scheduled date
,dr enter regular date
** Tags
toggle tag view :call ToggleColumnView()
add tag ,et
view tag in agenda double-click tag
** Sparse Tree Search
search :call SparseTreeRun('DEADLINE.*2011-03')
** Videos (on Vimeo)
[Org-mode clone for Vim[http://viimeo.com/16543959]]
[Sparse Tree Search in Vim clone of Org-mode[http://vimeo.com/16646716]]
[Overview of Tags in Org-mode clone for Vim[http://vimeo.com/16650450]]
[Basic Outline Editing in Vim org-clone[http://vimeo.com/16796666]]
** Links
[Vim org mode clone
announcement[http://permalink.gmane.org/gmane.emacs.orgmode/33226]]
[Vim Organizer Source[https://github.com/hsitz/VimOrganizer]]
[Vim Organizer Announcement[]]
[Emacs org-mode home[http://orgmode.org]]
** Hints
[PyScratch Demo[http://vimeo.com/16871727]]
:set filetype to see if filetype is org

File renamed without changes.
89 changes: 89 additions & 0 deletions contrib/vim73.diff
@@ -0,0 +1,89 @@
diff --recursive -du src/eval.c ../vim73organizer/src/eval.c
--- src/eval.c Mon Aug 9 21:12:14 2010
+++ ../vim73organizer/src/eval.c Tue Nov 16 20:57:04 2010
@@ -362,6 +362,7 @@
{VV_NAME("operator", VAR_STRING), VV_RO},
{VV_NAME("searchforward", VAR_NUMBER), 0},
{VV_NAME("oldfiles", VAR_LIST), 0},
+ {VV_NAME("foldhighlight", VAR_NUMBER), 0},
};

/* shorthand */
diff --recursive -du src/screen.c ../vim73organizer/src/screen.c
--- src/screen.c Fri Aug 13 14:21:27 2010
+++ ../vim73organizer/src/screen.c Tue Nov 16 21:01:32 2010
@@ -2271,10 +2271,17 @@
# define RL_MEMSET(p, v, l) for (ri = 0; ri < l; ++ri) \
ScreenAttrs[off + (p) + ri] = v
#endif
-
- /* Set all attributes of the 'number' or 'relativenumber' column and the
- * text */
- RL_MEMSET(col, hl_attr(HLF_FL), W_WIDTH(wp) - col);
+ /*
+ * 4. Compose the folded-line string with 'foldtext', if set.
+ */
+ text = get_foldtext(wp, lnum, lnume, foldinfo, buf);
+
+ txtcol = col; /* remember where text starts */
+
+ /* Set all attributes of the 'number' column and the text */
+ //RL_MEMSET(col, hl_attr(HLF_FL), W_WIDTH(wp) - col);
+ RL_MEMSET(col, hl_attr(get_vim_var_nr(VV_FOLDHIGHLIGHT)), W_WIDTH(wp) - col);
+

#ifdef FEAT_SIGNS
/* If signs are being displayed, add two spaces. */
@@ -2289,10 +2296,11 @@
if (wp->w_p_rl)
/* the line number isn't reversed */
copy_text_attr(off + W_WIDTH(wp) - len - col,
- (char_u *)" ", len, hl_attr(HLF_FL));
+ (char_u *)" ", len, hl_attr(get_vim_var_nr(VV_FOLDHIGHLIGHT)));
+
else
# endif
- copy_text_attr(off + col, (char_u *)" ", len, hl_attr(HLF_FL));
+ copy_text_attr(off + col, (char_u *)" ", len, hl_attr(get_vim_var_nr(VV_FOLDHIGHLIGHT)));
col += len;
}
}
@@ -2324,10 +2332,10 @@
if (wp->w_p_rl)
/* the line number isn't reversed */
copy_text_attr(off + W_WIDTH(wp) - len - col, buf, len,
- hl_attr(HLF_FL));
+ hl_attr(get_vim_var_nr(VV_FOLDHIGHLIGHT)));
else
#endif
- copy_text_attr(off + col, buf, len, hl_attr(HLF_FL));
+ copy_text_attr(off + col, buf, len, hl_attr(get_vim_var_nr(VV_FOLDHIGHLIGHT)));
col += len;
}
}
@@ -2335,9 +2343,9 @@
/*
* 4. Compose the folded-line string with 'foldtext', if set.
*/
- text = get_foldtext(wp, lnum, lnume, foldinfo, buf);
-
- txtcol = col; /* remember where text starts */
+ //text = get_foldtext(wp, lnum, lnume, foldinfo, buf);
+// moved up above to heappen earlier h.s.
+ // txtcol = col; /* remember where text starts */

/*
* 5. move the text to current_ScreenLine. Fill up with "fill_fold".
diff --recursive -du src/vim.h ../vim73organizer/src/vim.h
--- src/vim.h Thu Jul 29 19:46:39 2010
+++ ../vim73organizer/src/vim.h Tue Nov 16 20:57:16 2010
@@ -1842,7 +1842,8 @@
#define VV_OP 52
#define VV_SEARCHFORWARD 53
#define VV_OLDFILES 54
-#define VV_LEN 55 /* number of v: vars */
+#define VV_FOLDHIGHLIGHT 55
+#define VV_LEN 56 /* number of v: vars */

#ifdef FEAT_CLIPBOARD