Fork me on GitHub
#vim
<
2021-03-29
>
emilaasa06:03:07

Is there something like :put but you get the text inline at the cursor position in vim?

emilaasa06:03:28

:put seems to put things on a newline always

emilaasa06:03:58

I want something like this: nnoremap <leader>date :put =strftime('%Y-%m-%d')

emilaasa06:03:11

But having it inline instead of on a newline 🙂

nbardiuk08:03:00

I have very similar mapping nnoremap <leader>dt a<C-R>=strftime(time_format)<CR><Esc> it uses <c-r>= to evaluate expression in insert mode

❤️ 3
walterl13:03:14

Not sure where I picked this up from, but mine looks like this: "=strftime("%Y-%m-%d %H:%M:%S")<CR>P

❤️ 3
Timofey Sitnikov14:03:05

Good morning vimmers, I am using vim-iced and when I start is with the kaocha option and test the following:

(deftest a-test
  (testing "FIXME, I pass"
    (is (= 1 1))))

(deftest b-test
  (testing "FIXME, I fail."
    (is (= 2 1))))
I get the following output:
;;
;; Iced Buffer
;;
Testing: :unit
Testing ns(1/1): :sittim.ssm-characterization-test
Testing var(1/2): :sittim.ssm-characterization-test/b-test
Testing var(2/2): :sittim.ssm-characterization-test/a-test
What confuses me is the second test should fail and there should be indication, but there is none.

uochan04:03:12

@U012GN57FJ9 In my environment, vim-iced opens test result buffer (not stdout buffer) with the following contents automatically.

;; foo.core-test/b-test: FIXME, I fail.
expected: (= 2 1)
  actual: (not (= 2 1))
c.f. https://liquidz.github.io/vim-iced/vim-iced.html#%3AIcedTestBufferOpen