Giter Site home page Giter Site logo

calendar.vim's Introduction

Hey there, I'm itchyny

I love open-source software. I love Vim, Go, Rust, and jq.

I'm looking for GitHub sponsors.

Most used languages GitHub stats

calendar.vim's People

Contributors

apeiros-46b avatar ekaj2 avatar itchyny avatar mattn avatar mmontu avatar purefun avatar torbjo avatar ujihisa avatar wnp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

calendar.vim's Issues

Unknown function: s:black

Hi,

Thank you for writing such an awesome plugin.

For some calendars I get the following error:

Error detected while processing function calendar#new..18..20..24..59..90..125..284..283..155..153..calendar#google#calendar#getEvents..calendar#color#new_syntax..calendar#color#convert:
line 22:
E117: Unknown function: s:black
E15: Invalid expression: s:black((rgb[0] + rgb[1] + rgb[2]) / 3)
E117: Unknown function: s:black
E15: Invalid expression: s:black((rgb[0] + rgb[1] + rgb[2]) / 3)
E117: Unknown function: s:black
E15: Invalid expression: s:black((rgb[0] + rgb[1] + rgb[2]) / 3)

VimL interface

First of all, thank you very much for this awesome plugin!

I'm creating some Ultisnip snippets for vimwiki files and I'm looking for some time/date functions that are certainly present on this plugin.

I've started browsing the code, but it is rather larger than I first guessed. Are there any functions that can be used on VimL code? In special, returning the current day of week (as a number or any other representation) and dd/mm representations (or any similar, as it could be swapped by substitute()) relative to 'today'? (e.g.: echo functionX(0): 10/02, echo functionX(2): 12/02, echo functionX(-10): 31/01)

Some events taking place in 2 months not displayed in the later month

When I create events with certain start dates in one month and end dates in the next, the event “bar” is not displayed in the later month.

This seems to occur only for dates, which do not start in the last week/line of the start month. If the start date is in the last week, everything is fine.

I have created two events with start dates Oct 23 and 30, respectively, which both end on Nov 14, here are the items:
{ 'items': [ {'id': '201407221440380001', 'summary': 'random 1', 'end': {'date': '2014-11-15'}, 'start': {'date': '2014-10-30'}}, {'id': '201407221440510002', 'summary': 'random 2', 'end': {'date': '2014-11-15'}, 'start': {'date': '2014-10-23'}} ] }

And here are two screenshots showing that event random 1 (start date last week) is displayed properly next month, and that event random 2 is not displayed at all (or even hinted at). If you remove the functioning event random 2, the calendar for November will be empty.

start-month

end-month

Entered event with wrong syntax - now lots of errors; path to file containg all events?

I entered an event using 15:00 - 16:00 instead of 15:00-16:00. Now everytime I start :Calendar I get the following errors:

Error detected while processing function calendar#new..29..31..36..82..113..150..319..318..185..183..192:
line   12:
E704: Funcref variable name must start with a capital: date
line   14:
E704: Funcref variable name must start with a capital: enddate

The problem is that the event is not displayed in the calendar; hence I can't delete it and vim.calendar tries parsing the faulty event every time I load the calendar.

Where can I find the file containing all events so I can delete the bad event manually?

Remove sunday background color

How can I remove Sunday date numbers background color? I know I can change this line to

call calendar#color#syntax('Sunday', s:sunday_fg_color, '', '')

But I was wondering how to do it from my vimrc or colorscheme.

Thanks!

Problem with first_day switch?

I'm seeing some funny behavior, possibly related to opening a calendar with the -first_day=monday switch.

Day labels come up as Sun-Mon-Wed-Thu-Fri-Sat-Sat, with the two Sat labels at the end appearing over the (true) weekend dates (that is, the date numbers appear correctly for a Monday-first-day view, but 3 of the column labels are incorrect).

Day labels

Similarly, the current month-name and all day-labels are also mislabeled on year views:

Month labels

More month labels

I'm not 100% sure it started with issuing the first_day switch, but I didn't notice a problem before that, and can't make it behave normally now. Giving -first_day=sunday returns a week with days labeled Sat-Sun-Mon-Wed-Thu-Fri-Sat. Again, the dates are distributed correctly, but 3 of the column labels (now the leftmost three) are incorrect:

calendar3

The same (incorrect) labels appear on the weekly/daily views. Let me know if I can show you anything else. Currently running under Gvim on a Windows 7 box. Hope this helps!

Event spread over two months does not show in events list

I have created an event starting on Oct 31 and ending on Nov 5. When I move the cursor to Oct 31 and toggle the events list, the event is not displayed (the event list on that date is empty). Here is the corresponding item entry from the cache file (which is stored in 2014/11/).

{'id': '201407221433480005', 'summary': 'Random 4', 'end': {'date': '2014-11-6'}, 'start': {'date': '2014-10-31'}}

This behaviour seems to be reproducible by creating any event that is ending in a later month.

Syncing with Google Calendar issues

On two different distros now, I've had an issue where it'd take increasingly long for this to sync with google.

I've had problems with entering in the code I need to enter for the initial sync on this laptop, and every time I enter it wrong it takes longer for it to appear again.

Lots of Errors - Key not in dictionary, invalid arguments, duplicate entries

Many entries show up multiple times. In addition, Whenever i change views (i.e. scroll from month to month, or use > <) I am getting a LOT of errors:

rror detected while processing function 27..20..24..59..90..125..323..322:
line 99:
E716: Key not present in Dictionary: summary . trailing, v.inner_width)
E116: Invalid arguments for function calendar#string#truncate(evts.events[z].summary . trailing, v.inner_width)
E15: Invalid expression: calendar#string#truncate(evts.events[z].summary . trailing, v.inner_width)
line 101:
E121: Undefined variable: eventtext
E116: Invalid arguments for function len(eventtext)
E15: Invalid expression: len(eventtext)
line 106:
E121: Undefined variable: eventtext
E15: Invalid expression: f.vertical . eventtext
line 99:
E716: Key not present in Dictionary: summary . trailing, v.inner_width)
E116: Invalid arguments for function calendar#string#truncate(evts.events[z].summary . trailing, v.inner_width)
E15: Invalid expression: calendar#string#truncate(evts.events[z].summary . trailing, v.inner_width)
line 101:
E121: Undefined variable: eventtext
E116: Invalid arguments for function len(eventtext)
E15: Invalid expression: len(eventtext)
line 106:
E121: Undefined variable: eventtext
E15: Invalid expression: f.vertical . eventtext
line 99:
E716: Key not present in Dictionary: summary . trailing, v.inner_width)
E116: Invalid arguments for function calendar#string#truncate(evts.events[z].summary . trailing, v.inner_width)
E15: Invalid expression: calendar#string#truncate(evts.events[z].summary . trailing, v.inner_width)
line 101:
E121: Undefined variable: eventtext
E116: Invalid arguments for function len(eventtext)
E15: Invalid expression: len(eventtext)
line 106:
E121: Undefined variable: eventtext
E15: Invalid expression: f.vertical . eventtext
line 99:
E716: Key not present in Dictionary: summary . trailing, v.inner_width)
E116: Invalid arguments for function calendar#string#truncate(evts.events[z].summary . trailing, v.inner_width)
E15: Invalid expression: calendar#string#truncate(evts.events[z].summary . trailing, v.inner_width)
E716: Key not present in Dictionary: summary . trailing, v.inner_width)
E116: Invalid arguments for function calendar#string#truncate(evts.events[z].summary . trailing, v.inner_width)
E15: Invalid expression: calendar#string#truncate(evts.events[z].summary . trailing, v.inner_width)
E716: Key not present in Dictionary: summary . trailing, v.inner_width)
E116: Invalid arguments for function calendar#string#truncate(evts.events[z].summary . trailing, v.inner_width)
E15: Invalid expression: calendar#string#truncate(evts.events[z].summary . trailing, v.inner_width)
E716: Key not present in Dictionary: summary . trailing, v.inner_width)
E116: Invalid arguments for function calendar#string#truncate(evts.events[z].summary . trailing, v.inner_width)
E15: Invalid expression: calendar#string#truncate(evts.events[z].summary . trailing, v.inner_width)
E716: Key not present in Dictionary: summary . trailing, v.inner_width)
E116: Invalid arguments for function calendar#string#truncate(evts.events[z].summary . trailing, v.inner_width)

Add color variables

I use a vim colorscheme that heavily favors dark colors for the background. The red, blue, and greens used by Calendar.vim clash horribly with my colorscheme; it would be great if there were some variables exposed that could be used to change these colors.

[Question] Syncing with Google Calendar fail.

Thanks for this life changing vim app. I love it.

Well but actually, recent commit might make syncing with Google Calendar fail in my environment ( my vimrc )
I said 'might' because it might worked correctly only once.

This is my current situation.

  1. I'm behind network proxy and $http_proxy and $https_proxy
    are correctly configured (wget works correctly).
  2. When I installed early version of calendar.vim and configured google accounts,
    it worked perfectly at first time.
  3. However, when I tried to add event in calendar.vim, it actually did not add event
    but say nothing (no error message).
    And also, it never receive events from Google Calendar even there are some new
    events.
  4. So today, I re-configured my vimrc and re-installed calendar.vim and
    removed ~/.cache/calendar.vim/ then calendar.vim could not sync with
    Google calendar even in the first time.

This is what I got in vim message window.

Error detected while processing function calendar#async#call..calendar#webapi#callback:
line   10:                                                                                                                                                                    
E684: list index out of range: 2
Press ENTER or type command to continue

Error detected while processing function calendar#async#call..calendar#webapi#callback:
line   10:
E15: Invalid expression: data[i] =~ '^HTTP/1.\d 3' || data[i] =~ '^HTTP/1\.\d 200 Connection established' || data[i] =~ '^HTTP/1\.\d 100 Continue'
Press ENTER or type command to continue

I tried to figure out what was going on but unfortunately I'm not really familiar with vim-script.
So would you help me to solve this problem? Any help is welcome.

Thanks.

uname -s -r -v

Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1

vim --version

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 25 2013 22:50:51)
適用済パッチ: 1-41
Compiled by alisue@alisue-labdesk
Huge 版 with GTK2-GNOME GUI.  機能の一覧 有効(+)/無効(-)
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
+balloon_eval    +float           +mouse_urxvt     -tag_any_white
+browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
+clientserver    -hangul_input    +netbeans_intg   +title
+clipboard       +iconv           +path_extra      +toolbar
+cmdline_compl   +insert_expand   -perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con_gui  +lua             +rightleft       +windows
+diff            +menu            +ruby            +writebackup
+digraphs        +mksession       +scrollbind      +X11
+dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     +xim
+emacs_tags      +mouseshape      -sniff           +xsmp_interact
+eval            +mouse_dec       +startuptime     +xterm_clipboard
+ex_extra        -mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    +xpm
      システム vimrc: "$VIM/vimrc"
        ユーザ vimrc: "$HOME/.vimrc"
     第2ユーザ vimrc: "~/.vim/vimrc"
         ユーザ exrc: "$HOME/.exrc"
     システム gvimrc: "$VIM/gvimrc"
       ユーザ gvimrc: "$HOME/.gvimrc"
    第2ユーザ gvimrc: "~/.vim/gvimrc"
    システムメニュー: "$VIMRUNTIME/menu.vim"
       省略時の $VIM: "/usr/local/share/vim"
コンパイル: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -pthread -D_REENTRANT -DORBIT2=1 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/gtk-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/cairo -I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/libgnomeui-2.0 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0   -I/usr/local/include  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
リンク: gcc   -L. -Wl,-z,relro -rdynamic -Wl,-export-dynamic  -L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0     -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgconf-2 -lgthread-2.0 -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0   -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lnsl   -ldl  -L/usr/lib -llua5.2  -L/usr/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions   -lruby-1.9.1 -lpthread -lrt -ldl -lcrypt -lm  -L/usr/lib   

Multiple task lists from Google calendar

I have two task lists on Google calendar (Personal and Work tasks). The task view shows two lists, the lists correctly have different titles (Personal-tasks and Work-tasks), but the actual tasks in the second list are just copies of the first.

I therefore see the following:

    Personal-tasks

Personal task 1
Personal task 2

    Work-tasks

Personal task 1
Personal task 2

Integration with vimwiki

I just recently noticed your calendar plugin, and I am impressed. It looks amazing!

However, there is one major feature that I miss, and that is implemented in Matsumotos calendar plugin: A calendar action hook. This hook is used by vimwiki to let the function vimwiki#diary#calendar_action open the current chosen date with <cr>.

Refresh Google Calendar?

Is it possible to refresh the calendar contents from Google? I noticed that when I add an event to my calendar (via Google Calendar web interface) it doesn't show up in my Vim calendar. Restarting Vim seems to have no effect.

Thanks!

sorry for my poor description, here comes with the new descirption

sorry for my poor description:

about the color, could you add a sign '*' on current day? and cancel the background color of other days, cause which make user confused.

as for writing diary, when user click one day on the calendar, then there is a file created in a special directory(like ~/diary/2014/1/15/) , then user can write the content of diary in that file.

why I try to use your calendar.vim is that the google task sync. which is cool, but I am not sure whether users who use two-step verification can do this.

anyway, thanks for your plugin, that is really cool

Error after first call of :Calendar

Getting following error message when calling :Calendar first time

Error detected while processing function 318..362..432:
line 15:
E716: Key not present in Dictionary: view.action(a:action)
E15: Invalid expression: self.view.action(a:action)

Subsequent calls don't produce error messages.

I also deleted the .cache/calendar.vim directory and reinstalled the plugin, but it does not help.

Feature Request: Add event times automatically when applicable.

Interesting plugin - thanks for your hard work. When on the week or day views when you can navigate through the actual hours of the day, it would be useful if when you create an event it would automatically fill in the given hours. Maybe there's a way to do this that I haven't yet discovered. Thanks!

Google authentication doesn't work in Windows 7

The problem is in the function

function! calendar#webapi#open_url(url)
  if has('win32') || has('win64')
"    silent! call calendar#util#system('start rundll32 url.dll,FileProtocolHandler "' . a:url . '" &')
...

I don't know where this method originates but this is simply not the way to launch external url handler in Windows. url.dll doesn't exist in my Windows 7.

I replaced this line with

     call system( printf('cmd.exe /c start "" "%s"', a:url) ) 

This works and opens default browser where you get the code so you can paste it.

However even if I paste the code I get error that I can not be verified.

curl 7.30.0-DEV (x86_64-pc-win32) libcurl/7.30.0-DEV OpenSSL/1.0.1e zlib/1.2.8 libssh2/1.4.4_DEV
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM SSL libz

Support for multiple accounts

Hi,

It would be great if I could fetch data from two or more google accounts and merge them in this plugin. Lot of work?

Does not connect to Google calendar

First try worked but I connected to my wrong Google account. Removing the repository (~/.vim/bundle/calendar) and re-downloading did not help. I am no longer prompted via my browser (google-chrome) to connect to a Google account. Surprisingly, I still find my original (unwanted) Google account (email) in the newly downloaded repository. Also, I noticed that the cache directory specified in my ~/.vimrc is not respected. I found that it was not created but the default ~/.cache/calendar.vim was used instead. Removing that directory still did not help me connect to an account.

Add a Toggle command

It would be really cool if Calendar.vim had a :CalendarToggle command, much like gundo or tagbar etc., so Calendar could be called / dismissed with the same key (I prefer to use f-keys for these).

Support reading calendar entries from a script output?

I love this, but I don't trust Google any more -- is there a way to feed the calendar entries via a script? That way I could plug in my own calendar software.

(I also hadn't noticed if there was a way to save entries back to Google.)

a work week (M-F) view similar to the Days (4 day view) or custom views

The Days view with 4 days makes me think a work week 5 day (M-F) view would be nice.

Is this something you'd consider adding or can the Week view be configured to not show the weekend?

On the same note, is there a way to build my own custom views. Like if I wanted to create a 6 month view, or a day view that shows half hour increments or shows only work hours, etc. I see that you have something like this under views. Is there a template I can use to create custom views?

By the way, you've done excellent work on this plugin. I never thought I'd need a calendar in vim and now I can't stop playing with it.

Calendar needs a better color scheme for dark backgrounds

When vim is being used in a terminal with a dark background color scheme (eg: "argonaut"), the calendar shows white lines and white text, but no other colors. It's possible to detect this in a vim script by checking the background variable.

If this is not very high on the priority list, I'll be happy to figure out the appropriate changes if you point me in the right direction.

Thanks

Can't give timestamp

Nice job, Itchyny!

Downloaded Calendar.vim, installed with Vundle.

It works. With one exception. I'm not able to give any time for my events. I move to a day, press the letter i, and in the commandline EVENT: I can type the name of event. I see no date or time. After pressing, the event is logged into calendar, but I'm still not able to give a time for an event.

CalDAV support

It would be nice to have CalDAV support so that you could host your calendar anywhere.

Extended Task Features

Assuming they aren't already implemented and I somehow just missed it, could a couple of features be added for tasks? Namely being able to set due dates, add notes for tasks, and perhaps even reorder tasks within a list although (imo) that's the least essential.

All of these operations seem to be supported by the google tasks api, so it should be possible:
https://developers.google.com/google-apps/tasks/v1/reference/tasks/update
https://developers.google.com/google-apps/tasks/v1/reference/tasks#resource

I'd take a crack at implementing this myself if you're ok with the idea.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.