vlang / ved

1 MB text editor written in V with hardware accelerated text rendering. Compiles in <1s.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't run VID

ManPython opened this issue · comments

v-0.1.29\v\examples\vid-master\vid-master>v run vid.v
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
vid.v:62:2: error: unknown type `View`
   60 |     splits_per_workspace int
   61 |     page_height      int
   62 |     views            []View
      |     ~~~~~~~~~~~~~~~~~~~~~~~
   63 |     cur_split        int
   64 |     view             &View
vid.v:64:2: error: unknown type `View`
   62 |     views            []View
   63 |     cur_split        int
   64 |     view             &View
      |     ~~~~~~~~~~~~~~~~~~~~~~
   65 |     mode             EditorMode
   66 |     just_switched    bool // for keydown/char events to avoid dup keys
vid.v:86:2: error: unknown type `Timer`
   84 |     chunks           []Chunk
   85 |     is_building      bool
   86 |     timer            Timer
      |     ~~~~~~~~~~~~~~~~~~~~~~
   87 |     task_start_unix  u64
   88 |     cur_task         string
vid.v:98:2: error: unknown type `Config`
   96 |     gg_lines         []string
   97 |     gg_pos           int
   98 |     cfg              Config
      |     ~~~~~~~~~~~~~~~~~~~~~~~
   99 | }
  100 |
vid.v:173:10: error: unknown method: `Config.init_colors`
  171 |     }
  172 |     vid.handle_segfault()
  173 |     vid.cfg.init_colors()
      |             ~~~~~~~~~~~~~
  174 |     vid.page_height = size.height / vid.line_height - 1
  175 |     // TODO V keys only
vid.v:198:14: error: unknown function: new_timer
  196 |     })
  197 |         println('FULL SCREEN=${!is_window}')
  198 |     vid.timer = new_timer(vid.vg)
      |                 ~~~~~~~~~~~~~~~~~
  199 |     vid.load_all_tasks()
  200 |
vid.v:199:6: error: unknown method: `Vid.load_all_tasks`
  197 |         println('FULL SCREEN=${!is_window}')
  198 |     vid.timer = new_timer(vid.vg)
  199 |     vid.load_all_tasks()
      |         ~~~~~~~~~~~~~~~~
  200 |
  201 |     // TODO linux and windows
vid.v:223:13: error: unknown method: `View.open_file`
  221 |             vid.add_workspace(workspace)
  222 |             vid.open_workspace(0)
  223 |             vid.view.open_file(path)
      |                      ~~~~~~~~~~~~~~~
  224 |         }
  225 |     }
vid.v:306:19: error: mismatched types `void` and `void`
  304 |     now := time.now()
  305 |     // Coords
  306 |     y := (vid.view.y - vid.view.from) * vid.line_height + vid.line_height
      |                      ^
  307 |     // Cur line
  308 |     line_x := split_width * (vid.cur_split - from) + vid.view.padding_left + 10
vid.v:308:73: error: mismatched types `void` and `any_int`
  306 |     y := (vid.view.y - vid.view.from) * vid.line_height + vid.line_height
  307 |     // Cur line
  308 |     line_x := split_width * (vid.cur_split - from) + vid.view.padding_left + 10
      |                                                                            ^
  309 |     vid.vg.draw_rect(line_x, y - 1, split_width - vid.view.padding_left - 10, vid.line_height, vid.cfg.vcolor)
  310 |     // V selection
vid.v:309:29: error: mismatched types `void` and `any_int`
  307 |     // Cur line
  308 |     line_x := split_width * (vid.cur_split - from) + vid.view.padding_left + 10
  309 |     vid.vg.draw_rect(line_x, y - 1, split_width - vid.view.padding_left - 10, vid.line_height, vid.cfg.vcolor)
      |                                ^
  310 |     // V selection
  311 |     mut v_from := vid.view.vstart + 1
vid.v:311:32: error: mismatched types `void` and `any_int`
  309 |     vid.vg.draw_rect(line_x, y - 1, split_width - vid.view.padding_left - 10, vid.line_height, vid.cfg.vcolor)
  310 |     // V selection
  311 |     mut v_from := vid.view.vstart + 1
      |                                   ^
  312 |     mut v_to := vid.view.vend + 1
  313 |     if view.vend < view.vstart {
vid.v:312:28: error: mismatched types `void` and `any_int`
  310 |     // V selection
  311 |     mut v_from := vid.view.vstart + 1
  312 |     mut v_to := vid.view.vend + 1
      |                               ^
  313 |     if view.vend < view.vstart {
  314 |         // Swap start and end if we go beyond the start
vid.v:315:26: error: mismatched types `void` and `any_int`
  313 |     if view.vend < view.vstart {
  314 |         // Swap start and end if we go beyond the start
  315 |         v_from = vid.view.vend + 1
      |                                ^
  316 |         v_to = vid.view.vstart + 1
  317 |     }
vid.v:316:26: error: mismatched types `void` and `any_int`
  314 |         // Swap start and end if we go beyond the start
  315 |         v_from = vid.view.vend + 1
  316 |         v_to = vid.view.vstart + 1
      |                                ^
  317 |     }
  318 |     for yy := v_from; yy <= v_to; yy++ {
vid.v:318:34: error: invalid operation: ++ (non-numeric type `void`)
  316 |         v_to = vid.view.vstart + 1
  317 |     }
  318 |     for yy := v_from; yy <= v_to; yy++ {
      |                                     ~~
  319 |         vid.vg.draw_rect(line_x, (yy - vid.view.from) * vid.line_height,
  320 |         split_width - vid.view.padding_left, vid.line_height, vid.cfg.vcolor)
vid.v:319:32: error: mismatched types `void` and `void`
  317 |     }
  318 |     for yy := v_from; yy <= v_to; yy++ {
  319 |         vid.vg.draw_rect(line_x, (yy - vid.view.from) * vid.line_height,
      |                                      ^
  320 |         split_width - vid.view.padding_left, vid.line_height, vid.cfg.vcolor)
  321 |     }
vid.v:323:19: error: unknown method: `View.line`
  321 |     }
  322 |     // Tab offset for cursor
  323 |     line := vid.view.line()
      |                      ~~~~~~
  324 |     mut cursor_tab_off := 0
  325 |     for i := 0; i < line.len && i < vid.view.x; i++ {
vid.v:325:23: error: unknown selector expression
  323 |     line := vid.view.line()
  324 |     mut cursor_tab_off := 0
  325 |     for i := 0; i < line.len && i < vid.view.x; i++ {
      |                          ~~~
  326 |         // if rune != '\t' {
  327 |         if int(line[i]) != vid.cfg.tab {
vid.v:327:17: error: type `void` does not support indexing
  325 |     for i := 0; i < line.len && i < vid.view.x; i++ {
  326 |         // if rune != '\t' {
  327 |         if int(line[i]) != vid.cfg.tab {
      |                       ^
  328 |             break
  329 |         }
vid.v:340:19: error: ! operator can only be used with bool types
  338 |         v := vid.views[i]
  339 |         mut name := v.short_path
  340 |         if v.changed && !v.path.ends_with('/out') {
      |                         ^
  341 |             name = '$name [+]'
  342 |         }
vid.v:341:10: error: cannot assign `string` to `name` of type `void`
  339 |         mut name := v.short_path
  340 |         if v.changed && !v.path.ends_with('/out') {
  341 |             name = '$name [+]'
      |                   ~~
  342 |         }
  343 |         vid.vg.draw_text(vid.split_x(i - from) + v.padding_left + 10, 1, name, vid.cfg.file_name_cfg)
vid.v:343:10: error: unknown method: `gg.Context.draw_text`
  341 |             name = '$name [+]'
  342 |         }
  343 |         vid.vg.draw_text(vid.split_x(i - from) + v.padding_left + 10, 1, name, vid.cfg.file_name_cfg)
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  344 |     }
  345 |     // Git diff stats
vid.v:347:10: error: unknown method: `gg.Context.draw_text`
  345 |     // Git diff stats
  346 |     if vid.git_diff_plus != '+' {
  347 |         vid.vg.draw_text(vid.win_width - 400, 1, vid.git_diff_plus, vid.cfg.plus_cfg)
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  348 |     }
  349 |     if vid.git_diff_minus != '-' {
vid.v:350:10: error: unknown method: `gg.Context.draw_text`
  348 |     }
  349 |     if vid.git_diff_minus != '-' {
  350 |         vid.vg.draw_text(vid.win_width - 350, 1, vid.git_diff_minus, vid.cfg.minus_cfg)
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  351 |     }
  352 |     // Workspaces
vid.v:356:9: error: unknown method: `gg.Context.draw_text`
  354 |     cur_space := vid.workspace_idx + 1
  355 |     space_name := short_space(vid.workspace)
  356 |     vid.vg.draw_text(vid.win_width - 220, 1, '[$space_name]', vid.cfg.file_name_cfg)
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  357 |     vid.vg.draw_text(vid.win_width - 150, 1, '$cur_space/$nr_spaces', vid.cfg.file_name_cfg)
  358 |     // Time
vid.v:357:9: error: unknown method: `gg.Context.draw_text`
  355 |     space_name := short_space(vid.workspace)
  356 |     vid.vg.draw_text(vid.win_width - 220, 1, '[$space_name]', vid.cfg.file_name_cfg)
  357 |     vid.vg.draw_text(vid.win_width - 150, 1, '$cur_space/$nr_spaces', vid.cfg.file_name_cfg)
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  358 |     // Time
  359 |     vid.vg.draw_text(vid.win_width - 50, 1, now.hhmm(), vid.cfg.file_name_cfg)
vid.v:359:9: error: unknown method: `gg.Context.draw_text`
  357 |     vid.vg.draw_text(vid.win_width - 150, 1, '$cur_space/$nr_spaces', vid.cfg.file_name_cfg)
  358 |     // Time
  359 |     vid.vg.draw_text(vid.win_width - 50, 1, now.hhmm(), vid.cfg.file_name_cfg)
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  360 |     // vid.vg.draw_text(vid.win_width - 550, 1, now.hhmmss(), file_name_cfg)
  361 |     // vim top right next to current time
vid.v:374:10: error: unknown method: `gg.Context.draw_text`
  372 |         task_x := vid.win_width - split_width - task_text_width - 10
  373 |         // vid.timer.vg.draw_text(task_x, 1, vid.timer.cur_task.to_upper(), file_name_cfg)
  374 |         vid.vg.draw_text(task_x, 1, vid.cur_task, vid.cfg.file_name_cfg)
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  375 |         // Draw current task time
  376 |         task_time_x := (vid.nr_splits - 1) * split_width - 50
vid.v:377:10: error: unknown method: `gg.Context.draw_text`
  375 |         // Draw current task time
  376 |         task_time_x := (vid.nr_splits - 1) * split_width - 50
  377 |         vid.vg.draw_text(task_time_x, 1, '${vid.task_minutes()}m',
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  378 |             vid.cfg.file_name_cfg)
  379 |     }
vid.v:392:35: error: mismatched types `void` and `void`
  390 |     }
  391 |     // Cursor
  392 |     cursor_x := line_x + (vid.view.x + cursor_tab_off * vid.cfg.tab_size) * vid.char_width
      |                                      ^
  393 |     vid.vg.draw_empty_rect(cursor_x, y - 1, vid.char_width, vid.line_height, vid.cfg.cursor_color)
  394 |     // query window
vid.v:393:37: error: mismatched types `void` and `any_int`
  391 |     // Cursor
  392 |     cursor_x := line_x + (vid.view.x + cursor_tab_off * vid.cfg.tab_size) * vid.char_width
  393 |     vid.vg.draw_empty_rect(cursor_x, y - 1, vid.char_width, vid.line_height, vid.cfg.cursor_color)
      |                                        ^
  394 |     // query window
  395 |     if vid.mode == .query {
vid.v:396:7: error: unknown method: `Vid.draw_query`
  394 |     // query window
  395 |     if vid.mode == .query {
  396 |         vid.draw_query()
      |             ~~~~~~~~~~~~
  397 |     }
  398 | }
vid.v:413:36: error: mismatched types `void` and `int`
  411 |     // Lines
  412 |     mut line_nr := 1// relative y
  413 |     for j := view.from; j < view.from + vid.page_height && j < view.lines.len; j++ {
      |                                       ^
  414 |         line := view.lines[j]
  415 |         if line.len > 5000 {
vid.v:415:3: error: type `void` does not support indexing
  413 |     for j := view.from; j < view.from + vid.page_height && j < view.lines.len; j++ {
  414 |         line := view.lines[j]
  415 |         if line.len > 5000 {
      |         ~~
  416 |             panic('line len too big! views[$i].lines[$j] ($line.len) path=$vid.view.path')
  417 |         }
vid.v:416:56: error: unknown selector expression
  414 |         line := view.lines[j]
  415 |         if line.len > 5000 {
  416 |             panic('line len too big! views[$i].lines[$j] ($line.len) path=$vid.view.path')
      |                                                                 ~~~
  417 |         }
  418 |         x := split_x + view.padding_left
vid.v:422:23: error: mismatched types `void` and `any_int`
  420 |         // Error bg
  421 |         if view.error_y == j {
  422 |             vid.vg.draw_rect(x + 10, y - 1, split_width - view.padding_left - 10, vid.line_height, vid.cfg.errorbgcolor)
      |                                ^
  423 |         }
  424 |         // Line number
vid.v:425:20: error: mismatched types `void` and `any_int`
  423 |         }
  424 |         // Line number
  425 |         line_number := j + 1
      |                          ^
  426 |         vid.vg.draw_text(x+3, y, '$line_number', vid.cfg.line_nr_cfg)
  427 |         // Tab offset
vid.v:426:10: error: unknown method: `gg.Context.draw_text`
  424 |         // Line number
  425 |         line_number := j + 1
  426 |         vid.vg.draw_text(x+3, y, '$line_number', vid.cfg.line_nr_cfg)
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  427 |         // Tab offset
  428 |         mut line_x := x + 10
vid.v:428:19: error: mismatched types `void` and `any_int`
  426 |         vid.vg.draw_text(x+3, y, '$line_number', vid.cfg.line_nr_cfg)
  427 |         // Tab offset
  428 |         mut line_x := x + 10
      |                         ^
  429 |         mut nr_tabs := 0
  430 |         // for k := 0; k < line.len; k++ {
vid.v:437:4: error: operator += not defined on left operand type `void`
  435 |             }
  436 |             nr_tabs++
  437 |             line_x += vid.char_width * vid.cfg.tab_size
      |             ~~~~~~
  438 |         }
  439 |         // Number of chars to display in this view
vid.v:440:11: error: unknown selector expression
  438 |         }
  439 |         // Number of chars to display in this view
  440 |         if line.len > 0 {
      |                 ~~~
  441 |             // mut max := (split_width - view.padding_left - vid.char_width * TAB_SIZE *
  442 |             // nr_tabs) / vid.char_width - 1
vid.v:451:6: error: assignment mismatch: 1 variable(s) but `limit()` returns 0 value(s)
  449 |                 // max = line.len
  450 |             }
  451 |             s := line.limit(max)
      |               ~~
  452 |             if view.hl_on {
  453 |                 vid.draw_line(line_x, y, s)// SYNTAX HL
vid.v:456:12: error: unknown method: `gg.Context.draw_text`
  454 |             }
  455 |             else {
  456 |                 vid.vg.draw_text(line_x, y, line, vid.cfg.txt_cfg)// NO SYNTAX
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  457 |             }
  458 |         }
vid.v:464:88: error: mismatched types `void` and `int`
  462 |
  463 | fn (vid &Vid) max_chars(nr_tabs int) int {
  464 |     width := vid.split_width() -vid.view.padding_left - vid.char_width * vid.cfg.tab_size * nr_tabs
      |                                                                                           ^
  465 |     return width / vid.char_width - 1
  466 | }
vid.v:465:15: error: mismatched types `void` and `int`
  463 | fn (vid &Vid) max_chars(nr_tabs int) int {
  464 |     width := vid.split_width() -vid.view.padding_left - vid.char_width * vid.cfg.tab_size * nr_tabs
  465 |     return width / vid.char_width - 1
      |                  ^
  466 | }
  467 |
vid.v:481:10: error: unknown method: `gg.Context.draw_text`
  479 |     if line.contains('[32m') &&
  480 |     line.contains('PASS') {
  481 |         vid.vg.draw_text(x, y, line[5..], vid.cfg.green_cfg)
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  482 |         return
  483 |     }
vid.v:486:10: error: unknown method: `gg.Context.draw_text`
  484 |     else if line.contains('[31m') &&
  485 |     line.contains('FAIL') {
  486 |         vid.vg.draw_text(x, y, line[5..], vid.cfg.red_cfg)
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  487 |         return
  488 |     //} else if line[0] == `-` {
vid.v:539:23: error: unknown function: is_alpha_underscore
  537 |         }
  538 |         // Key
  539 |         for i < line.len && is_alpha_underscore(int(line[i])) {
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  540 |             i++
  541 |         }
vid.v:551:10: error: unknown method: `gg.Context.draw_text`
  549 |     }
  550 |     if vid.is_ml_comment {
  551 |         vid.vg.draw_text(x, y, line, vid.cfg.comment_cfg)
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  552 |         return
  553 |     }
vid.v:556:10: error: unknown method: `gg.Context.draw_text`
  554 |     if vid.chunks.len == 0 {
  555 |         // println('no chunks')
  556 |         vid.vg.draw_text(x, y, line, vid.cfg.txt_cfg)
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  557 |         return
  558 |     }
vid.v:570:11: error: unknown method: `gg.Context.draw_text`
  568 |         if chunk.start > pos + 1 {
  569 |             s := line[pos..chunk.start]
  570 |             vid.vg.draw_text(x + pos * vid.char_width, y, s, vid.cfg.txt_cfg)
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  571 |         }
  572 |         // Keyword string etc
vid.v:574:7: error: assignment mismatch: 1 variable(s) 0 value(s)
  572 |         // Keyword string etc
  573 |         typ := chunk.typ
  574 |         cfg := match typ {
      |             ~~
  575 |             .a_key { vid.cfg.key_cfg }
  576 |             .a_string { vid.cfg.string_cfg }
vid.v:580:10: error: unknown method: `gg.Context.draw_text`
  578 |         }
  579 |         s := line[chunk.start..chunk.end]
  580 |         vid.vg.draw_text(x + chunk.start * vid.char_width, y, s, cfg)
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  581 |         pos = chunk.end
  582 |         // Final text chunk
vid.v:585:11: error: unknown method: `gg.Context.draw_text`
  583 |         if i == vid.chunks.len - 1 && chunk.end < line.len {
  584 |             final := line[chunk.end..line.len]
  585 |             vid.vg.draw_text(x + pos * vid.char_width, y, final, vid.cfg.txt_cfg)
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  586 |         }
  587 |     }
vid.v:617:11: error: unexpected symbol `placeholder`
  615 |     }
  616 |     // Reset error line
  617 |     vid.view.error_y = -1
      |              ~~~~~~~
  618 |     match vid.mode {
  619 |         .normal {         vid.key_normal(key, mod) }
vid.v:623:24: error: unknown method: `Timer.key_down`
  621 |         .insert {         vid.key_insert(key, mod) }
  622 |         .query {         vid.key_query(key,  super) }
  623 |         .timer {         vid.timer.key_down(key, super) }
      |                                    ~~~~~~~~~~~~~~~~~~~~~
  624 |     }
  625 | }
vid.v:646:14: error: unknown method: `View.r`
  644 |         if !vid.just_switched && vid.prev_key == .r {
  645 |             if s != 'r' {
  646 |                 vid.view.r(s)
      |                          ~~~~
  647 |                 vid.prev_key = 0
  648 |                 vid.prev_cmd = 'r'
vid.v:678:8: error: unknown method: `Vid.ctrlp_open`
  676 |     .enter {
  677 |         if vid.query_type == .ctrlp {
  678 |             vid.ctrlp_open()
      |                 ~~~~~~~~~~~~
  679 |         }
  680 |         else if vid.query_type == .cam {
vid.v:684:13: error: unknown method: `View.open_file`
  682 |         }
  683 |         else if vid.query_type == .open {
  684 |             vid.view.open_file(vid.query)
      |                      ~~~~~~~~~~~~~~~~~~~~
  685 |         }
  686 |         else if vid.query_type == .task {
vid.v:698:14: error: unknown method: `View.open_file`
  696 |                 path := line.all_before(':')
  697 |                 line_nr := line[path.len+1..].int() -1
  698 |                 vid.view.open_file(vid.workspace + '/' + path)
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  699 |                 vid.view.move_to_line(line_nr)
  700 |                 vid.view.zz()
vid.v:699:14: error: unknown method: `View.move_to_line`
  697 |                 line_nr := line[path.len+1..].int() -1
  698 |                 vid.view.open_file(vid.workspace + '/' + path)
  699 |                 vid.view.move_to_line(line_nr)
      |                          ~~~~~~~~~~~~~~~~~~~~~
  700 |                 vid.view.zz()
  701 |                 vid.mode = .normal
vid.v:700:14: error: unknown method: `View.zz`
  698 |                 vid.view.open_file(vid.workspace + '/' + path)
  699 |                 vid.view.move_to_line(line_nr)
  700 |                 vid.view.zz()
      |                          ~~~~
  701 |                 vid.mode = .normal
  702 |             }
vid.v:705:9: error: unknown method: `Vid.git_grep`
  703 |             else {
  704 |                 // Otherwise just do a git grep on a submitted query
  705 |                 vid.git_grep()
      |                     ~~~~~~~~~~
  706 |             }
  707 |             return
vid.v:710:8: error: unknown method: `Vid.search`
  708 |         }
  709 |         else {
  710 |             vid.search(false)
      |                 ~~~~~~~~~~~~~
  711 |         }
  712 |         vid.mode = .normal
vid.v:751:23: error: cannot use `void` as type `bool` in return argument
  749 |
  750 | fn (vid &Vid) is_in_blog() bool {
  751 |     return vid.view.path.contains('/blog/') && vid.view.path.contains('2020')
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  752 | }
  753 |
vid.v:766:12: error: unknown method: `View.backspace`
  764 |     match key {
  765 |     .backspace {
  766 |         vid.view.backspace(vid.cfg.backspace_go_up)
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  767 |     }
  768 |     .enter {
vid.v:769:12: error: unknown method: `View.enter`
  767 |     }
  768 |     .enter {
  769 |         vid.view.enter()
      |                  ~~~~~~~
  770 |     }
  771 |     .escape {
vid.v:775:12: error: unknown method: `View.insert_text`
  773 |     }
  774 |     .tab {
  775 |         vid.view.insert_text('\t')
      |                  ~~~~~~~~~~~~~~~~~
  776 |     }
  777 |     .left {
vid.v:779:14: error: invalid operation: -- (non-numeric type `void`)
  777 |     .left {
  778 |         if vid.view.x > 0 {
  779 |             vid.view.x--
      |                       ~~
  780 |         }
  781 |     }
vid.v:783:12: error: unknown method: `View.l`
  781 |     }
  782 |     .right {
  783 |         vid.view.l()
      |                  ~~~
  784 |     }
  785 |     .up {
vid.v:786:12: error: unknown method: `View.k`
  784 |     }
  785 |     .up {
  786 |         vid.view.k()
      |                  ~~~
  787 |         //vid.refresh = false
  788 |     }
vid.v:790:12: error: unknown method: `View.j`
  788 |     }
  789 |     .down {
  790 |         vid.view.j()
      |                  ~~~
  791 |         //vid.refresh = false
  792 |     }
vid.v:796:12: error: unknown method: `View.save_file`
  794 |     }
  795 |     if (key == .k || key == .s) && super {
  796 |         vid.view.save_file()
      |                  ~~~~~~~~~~~
  797 |         vid.mode = .normal
  798 |         return
vid.v:807:12: error: unknown method: `View.insert_text`
  805 |     // Insert macro   TODO  customize
  806 |     if super && key == .g {
  807 |         vid.view.insert_text('<code></code>')
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  808 |         vid.view.x -= 7
  809 |     }
vid.v:808:12: error: unexpected symbol `placeholder`
  806 |     if super && key == .g {
  807 |         vid.view.insert_text('<code></code>')
  808 |         vid.view.x -= 7
      |                  ^
  809 |     }
  810 |     // Autocomplete
vid.v:826:19: error: unknown method: `View.line`
  824 |
  825 | fn (mut vid Vid) ctrl_n() {
  826 |     line := vid.view.line()
      |                      ~~~~~~
  827 |     mut i := vid.view.x - 1
  828 |     end := i
vid.v:827:22: error: mismatched types `void` and `any_int`
  825 | fn (mut vid Vid) ctrl_n() {
  826 |     line := vid.view.line()
  827 |     mut i := vid.view.x - 1
      |                         ^
  828 |     end := i
  829 |     for i > 0 && is_alpha_underscore(int(line[i])) {
vid.v:829:15: error: unknown function: is_alpha_underscore
  827 |     mut i := vid.view.x - 1
  828 |     end := i
  829 |     for i > 0 && is_alpha_underscore(int(line[i])) {
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  830 |         i--
  831 |     }
vid.v:830:4: error: invalid operation: -- (non-numeric type `void`)
  828 |     end := i
  829 |     for i > 0 && is_alpha_underscore(int(line[i])) {
  830 |         i--
      |          ~~
  831 |     }
  832 |     if !is_alpha_underscore(int(line[i])) {
vid.v:832:6: error: unknown function: is_alpha_underscore
  830 |         i--
  831 |     }
  832 |     if !is_alpha_underscore(int(line[i])) {
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  833 |         i++
  834 |     }
vid.v:833:4: error: invalid operation: ++ (non-numeric type `void`)
  831 |     }
  832 |     if !is_alpha_underscore(int(line[i])) {
  833 |         i++
      |          ~~
  834 |     }
  835 |     mut word := line[i..end + 1]
vid.v:835:26: error: mismatched types `void` and `any_int`
  833 |         i++
  834 |     }
  835 |     mut word := line[i..end + 1]
      |                             ^
  836 |     word = word.trim_space()
  837 |     // Dont autocomplete if  fewer than 3 chars
vid.v:836:2: error: type `void` does not support indexing
  834 |     }
  835 |     mut word := line[i..end + 1]
  836 |     word = word.trim_space()
      |     ~~~~
  837 |     // Dont autocomplete if  fewer than 3 chars
  838 |     if word.len < 3 {
vid.v:838:10: error: unknown selector expression
  836 |     word = word.trim_space()
  837 |     // Dont autocomplete if  fewer than 3 chars
  838 |     if word.len < 3 {
      |             ~~~
  839 |         return
  840 |     }
vid.v:844:13: error: unknown method: `View.insert_text`
  842 |         // If any word starts with our subword, add the rest
  843 |         if map_word.starts_with(word) {
  844 |             vid.view.insert_text(map_word[word.len..])
      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  845 |             return
  846 |         }
vid.v:871:13: error: unknown method: `View.shift_right`
  869 |         if shift {
  870 |             // >
  871 |             vid.view.shift_right()
      |                      ~~~~~~~~~~~~~
  872 |         }
  873 |         else {
vid.v:880:13: error: unknown method: `View.shift_left`
  878 |         if shift {
  879 |             // <
  880 |             vid.view.shift_left()
      |                      ~~~~~~~~~~~~
  881 |         }
  882 |     }
vid.v:927:13: error: unknown method: `View.shift_a`
  925 |     .a {
  926 |         if shift {
  927 |             vid.view.shift_a()
      |                      ~~~~~~~~~
  928 |             vid.prev_cmd = 'A'
  929 |             vid.set_insert()
vid.v:940:31: error: unknown method: `View.shift_c`
  938 |         }
  939 |         if shift {
  940 |             vid.prev_insert = vid.view.shift_c()
      |                                        ~~~~~~~~~
  941 |             vid.set_insert()
  942 |         }
vid.v:950:13: error: unknown method: `View.dd`
  948 |         }
  949 |         if vid.prev_key == .d {
  950 |             vid.view.dd()
      |                      ~~~~
  951 |             return
  952 |         }
vid.v:963:9: error: unknown method: `View.ce`
  961 |         }
  962 |         if vid.prev_key == .c {
  963 |             view.ce()
      |                  ~~~~
  964 |         }
  965 |         else if vid.prev_key == .d {
vid.v:966:9: error: unknown method: `View.de`
  964 |         }
  965 |         else if vid.prev_key == .d {
  966 |             view.de()
      |                  ~~~~
  967 |         }
  968 |     }
vid.v:971:13: error: unknown method: `View.shift_i`
  969 |     .i {
  970 |         if shift {
  971 |             vid.view.shift_i()
      |                      ~~~~~~~~~
  972 |             vid.set_insert()
  973 |             vid.prev_cmd = 'I'
vid.v:981:13: error: unknown method: `View.join`
  979 |     .j {
  980 |         if shift {
  981 |             vid.view.join()
      |                      ~~~~~~
  982 |         }
  983 |         else if super {
vid.v:989:13: error: unknown method: `View.j`
  987 |         else {
  988 |             // println('J isb=$vid.is_building')
  989 |             vid.view.j()
      |                      ~~~
  990 |             // if !vid.is_building {
  991 |             //vid.refresh = false
vid.v:996:12: error: unknown method: `View.k`
  994 |     }
  995 |     .k {
  996 |         vid.view.k()
      |                  ~~~
  997 |         // if !vid.is_building {
  998 |         //vid.refresh = false
vid.v:1004:8: error: unknown method: `Vid.search`
 1002 |         if shift {
 1003 |             // backwards search
 1004 |             vid.search(true)
      |                 ~~~~~~~~~~~~
 1005 |         }
 1006 |         else {
vid.v:1007:8: error: unknown method: `Vid.search`
 1005 |         }
 1006 |         else {
 1007 |             vid.search(false)
      |                 ~~~~~~~~~~~~~
 1008 |         }
 1009 |     }
vid.v:1023:13: error: unknown method: `View.shift_o`
 1021 |         }
 1022 |         else if shift {
 1023 |             vid.view.shift_o()
      |                      ~~~~~~~~~
 1024 |             vid.set_insert()
 1025 |         }
vid.v:1027:13: error: unknown method: `View.o`
 1025 |         }
 1026 |         else {
 1027 |             vid.view.o()
      |                      ~~~
 1028 |             vid.set_insert()
 1029 |         }
vid.v:1035:8: error: unknown method: `Vid.load_git_tree`
 1033 |             vid.mode = .query
 1034 |             vid.query_type = .ctrlp
 1035 |             vid.load_git_tree()
      |                 ~~~~~~~~~~~~~~~
 1036 |             vid.query = ''
 1037 |             vid.just_switched = true
V panic: array.get: index out of range (i == 0, a.len == 0)
print_backtrace_skipping_top_frames is not implemented

v-0.1.29\v\examples\vid-master\vid-master>v build vid.v
v build: unknown command
Run "v help" for usage.
v-0.1.29\v\examples\vid-master\vid-master>v help build
V Error: Unknown help topic provided. Use `v help` for usage information.

v-0.1.29\v\examples\vid-master\vid-master>v -build vid.v
and
\v-0.1.29\v\examples\vid-master\vid-master>v -live vid.v
give this same errors like in 1st post

He meant specifically v ., which tells V to build everything in the current directory as well as referenced modules and subdirectories.

By explicitly using v build vid.v you are missing other important files.

I just built it with v . and it built clean - no warnings or errors.