vim

For discussion on all things (neo)vim.
emilaasa 2021-03-29T06:54:07.027Z

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

emilaasa 2021-03-29T06:54:28.027400Z

:put seems to put things on a newline always

emilaasa 2021-03-29T06:54:58.027700Z

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

emilaasa 2021-03-29T06:55:11.028Z

But having it inline instead of on a newline 🙂

nbardiuk 2021-03-29T08:21:00.029200Z

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

❤️ 1
walterl 2021-03-29T13:55:14.029600Z

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

❤️ 1
Timofey Sitnikov 2021-03-29T14:21:05.031800Z

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.