diff --git a/1.vim b/1.vim index f0a25a2e..bef9a46c 100644 --- a/1.vim +++ b/1.vim @@ -12,10 +12,8 @@ inoremap coc#pum#visible() ? coc#pum#next(0) : coc#inline inoremap coc#pum#visible() ? coc#pum#prev(1) : coc#inline#visible() ? coc#inline#prev() : "\" inoremap coc#pum#visible() ? coc#pum#next(1) : coc#inline#visible() ? coc#inline#next() : "\" nnoremap  :NERDTreeFind -snoremap  c nnoremap  :NERDTree nmap  (ctrlp) -snoremap  "_c nnoremap  :NERDTreeToggle xmap \T (table-mode-tableize-delimiter) xmap \tt (table-mode-tableize) @@ -28,10 +26,6 @@ nnoremap \1 :call SN("1") nmap \rn (coc-rename) xmap gx NetrwBrowseXVis nmap gx NetrwBrowseX -snoremap c -snoremap c -snoremap c -snoremap "_c nnoremap GitGutterPreviewHunk :call gitgutter#utility#warn('Please change your map GitGutterPreviewHunk to (GitGutterPreviewHunk)') nnoremap (GitGutterPreviewHunk) :GitGutterPreviewHunk nnoremap GitGutterUndoHunk :call gitgutter#utility#warn('Please change your map GitGutterUndoHunk to (GitGutterUndoHunk)') @@ -138,13 +132,11 @@ set shiftwidth=4 set smarttab set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc,.snap set updatetime=500 -set winminheight=0 -set winminwidth=0 let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1 let v:this_session=expand(":p") silent only silent tabonly -cd ~/storage/VDMDI/Comms +cd ~/storage/VDMDI/CT if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' let s:wipebuf = bufnr('%') endif @@ -153,32 +145,8 @@ if &shortmess =~ 'A' else set shortmess=aoO endif -badd +132 build/styles.css -badd +27 src/base.css -badd +16 package.json -badd +1 build/version.txt -badd +6 src/ViewModel/Global/coreViewModel.ts -badd +194 src/View/Modals/settingsModal.tsx -badd +8 dist/sw.js -badd +1 build/sw.js -badd +80 src/index.tsx -badd +25 src/react.ts -badd +175 src/Model/Utility/utility.ts -badd +683 src/View/translations.ts -badd +133 src/View/homePage.tsx -badd +18 build/index.html -badd +178 src/Model/Global/storageModel.ts -badd +25 src/Model/Global/settingsModel.ts -badd +14 src/ViewModel/Global/storageViewModel.ts -badd +1 src/View/Components/replyLink.tsx -badd +22 src/View/Components/usageBar.tsx -badd +1 src/View/Components/messageReactionButtonRow.tsx -badd +1 src/View/Components/messageReactionButton.tsx -badd +1 src/View/Components/messageReactionEntry.tsx -badd +1 src/View/Components/messageReactionFilterButton.tsx -badd +15 src/View/homePage.css -badd +133 dist/styles.css -badd +24 src/View/Modals/storageModal.tsx +badd +21 build/sw.js +badd +0 build/version.txt argglobal %argdel edit build/sw.js @@ -201,12 +169,13 @@ set winminheight=0 set winheight=1 set winminwidth=0 set winwidth=1 -exe 'vert 1resize ' . ((&columns * 31 + 106) / 213) -exe 'vert 2resize ' . ((&columns * 90 + 106) / 213) -exe 'vert 3resize ' . ((&columns * 90 + 106) / 213) +exe 'vert 1resize ' . ((&columns * 31 + 111) / 223) +exe 'vert 2resize ' . ((&columns * 95 + 111) / 223) +exe 'vert 3resize ' . ((&columns * 95 + 111) / 223) argglobal enew -file NERD_tree_tab_2 +file NERD_tree_tab_1 +balt build/sw.js let s:cpo_save=&cpo set cpo&vim nnoremap :call nerdtree#ui_glue#invokeKeyMap("") @@ -229,14 +198,6 @@ nnoremap R :call nerdtree#ui_glue#invokeKeyMap("R") nnoremap T :call nerdtree#ui_glue#invokeKeyMap("T") nnoremap U :call nerdtree#ui_glue#invokeKeyMap("U") nnoremap X :call nerdtree#ui_glue#invokeKeyMap("X") -nmap [c (GitGutterPrevHunk) -nmap \hp (GitGutterPreviewHunk) -nmap \hu (GitGutterUndoHunk) -nmap \hs (GitGutterStageHunk) -xmap \hs (GitGutterStageHunk) -nmap ]c (GitGutterNextHunk) -xmap ac (GitGutterTextObjectOuterVisual) -omap ac (GitGutterTextObjectOuterPending) nnoremap cd :call nerdtree#ui_glue#invokeKeyMap("cd") nnoremap e :call nerdtree#ui_glue#invokeKeyMap("e") nnoremap f :call nerdtree#ui_glue#invokeKeyMap("f") @@ -244,8 +205,6 @@ nnoremap go :call nerdtree#ui_glue#invokeKeyMap("go") nnoremap gb :call nerdtree#ui_glue#invokeKeyMap("gb") nnoremap gi :call nerdtree#ui_glue#invokeKeyMap("gi") nnoremap gs :call nerdtree#ui_glue#invokeKeyMap("gs") -xmap ic (GitGutterTextObjectInnerVisual) -omap ic (GitGutterTextObjectInnerPending) nnoremap i :call nerdtree#ui_glue#invokeKeyMap("i") nnoremap m :call nerdtree#ui_glue#invokeKeyMap("m") nnoremap o :call nerdtree#ui_glue#invokeKeyMap("o") @@ -396,7 +355,7 @@ setlocal nowrap setlocal wrapmargin=0 wincmd w argglobal -balt dist/sw.js +balt build/sw.js let s:cpo_save=&cpo set cpo&vim nmap [c (GitGutterPrevHunk) @@ -544,15 +503,16 @@ setlocal wrap setlocal wrapmargin=0 silent! normal! zE let &fdl = &fdl -let s:l = 21 - ((20 * winheight(0) + 19) / 38) +let s:l = 1 - ((0 * winheight(0) + 17) / 34) if s:l < 1 | let s:l = 1 | endif keepjumps exe s:l normal! zt -keepjumps 21 -normal! $ +keepjumps 1 +normal! 0 wincmd w argglobal if bufexists(fnamemodify("build/version.txt", ":p")) | buffer build/version.txt | else | edit build/version.txt | endif +balt build/sw.js let s:cpo_save=&cpo set cpo&vim nmap [c (GitGutterPrevHunk) @@ -700,17 +660,17 @@ setlocal wrap setlocal wrapmargin=0 silent! normal! zE let &fdl = &fdl -let s:l = 1 - ((0 * winheight(0) + 19) / 38) +let s:l = 1 - ((0 * winheight(0) + 17) / 34) if s:l < 1 | let s:l = 1 | endif keepjumps exe s:l normal! zt keepjumps 1 -normal! 011| +normal! 0 wincmd w -2wincmd w -exe 'vert 1resize ' . ((&columns * 31 + 106) / 213) -exe 'vert 2resize ' . ((&columns * 90 + 106) / 213) -exe 'vert 3resize ' . ((&columns * 90 + 106) / 213) +3wincmd w +exe 'vert 1resize ' . ((&columns * 31 + 111) / 223) +exe 'vert 2resize ' . ((&columns * 95 + 111) / 223) +exe 'vert 3resize ' . ((&columns * 95 + 111) / 223) tabnext 1 if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 silent exe 'bwipe ' . s:wipebuf @@ -725,6 +685,7 @@ if filereadable(s:sx) exe "source " . fnameescape(s:sx) endif let &g:so = s:so_save | let &g:siso = s:siso_save +nohlsearch doautoall SessionLoadPost unlet SessionLoad " vim: set ft=vim : diff --git a/src/Model/Utility/utility.ts b/src/Model/Utility/utility.ts index 8f7ef9fc..9bd2b72c 100644 --- a/src/Model/Utility/utility.ts +++ b/src/Model/Utility/utility.ts @@ -21,7 +21,13 @@ export function createTimestamp(): string { } export function formatISO(date: Date): string { - return date.toISOString().split("T")[0]; + return formatISOFromParts(date.getFullYear(), date.getMonth()+1, date.getDate()) +} + +export function formatISOFromParts(year: number, month: number, date: number): string { + return [year, month, date] + .map((x, i) => i == 0 ? x : CalendarModel.padZero(x.toString())) + .join("-"); } export function formatTime(date: Date): string { diff --git a/src/ViewModel/Pages/calendarPageViewModel.ts b/src/ViewModel/Pages/calendarPageViewModel.ts index 1300f92f..9a967e00 100644 --- a/src/ViewModel/Pages/calendarPageViewModel.ts +++ b/src/ViewModel/Pages/calendarPageViewModel.ts @@ -8,7 +8,7 @@ import CalendarModel, { MonthGrid } from "../../Model/Files/calendarModel"; import BoardsAndTasksModel, { TaskFileContent, } from "../../Model/Files/boardsAndTasksModel"; -import {formatISO, formatTime} from "../../Model/Utility/utility"; +import {formatISO, formatISOFromParts, formatTime} from "../../Model/Utility/utility"; export const CALENDAR_EVENT_BOARD_ID = "events"; @@ -22,9 +22,7 @@ export default class CalendarPageViewModel extends TaskContainingPageViewModel { } get selectedDateString(): string { - return [this.selectedYear.value, this.selectedMonth.value, this.selectedDate.value] - .map((x, i) => i == 0 ? x : CalendarModel.padZero(x.toString())) - .join("-"); + return formatISOFromParts(this.selectedYear.value, this.selectedMonth.value, this.selectedDate.value); } // paths @@ -173,6 +171,7 @@ export default class CalendarPageViewModel extends TaskContainingPageViewModel { updateMonthGrid = (): void => { const today = formatISO(this.coreViewModel.todayDate.value) + console.log(today, this.coreViewModel.todayDate.value); if ( this.currentTodayDate == today )