Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 07:52
    lebensterben labeled #15703
  • 07:52
    lebensterben commented #15703
  • 06:22
    passeride edited #15703
  • 06:21
    passeride opened #15703
  • 03:58
    Redouane64a starred syl20bnr/spacemacs
  • Aug 16 20:07
    sivarki starred syl20bnr/spacemacs
  • Aug 16 20:04
    lebensterben assigned #15699
  • Aug 16 20:04
    lebensterben commented #15699
  • Aug 16 20:02
    lebensterben commented #14633
  • Aug 16 20:00
    lebensterben assigned #14633
  • Aug 16 19:59

    lebensterben on develop

    [bot] built_in_updates (#15702)… (compare)

  • Aug 16 19:59
    lebensterben closed #15702
  • Aug 16 19:47
    SpacemacsBot opened #15702
  • Aug 16 19:47
    lebensterben commented #15680
  • Aug 16 19:46

    lebensterben on develop

    spacemacs-editing-visual: fix t… (compare)

  • Aug 16 19:43
    lebensterben commented #15680
  • Aug 16 17:45
    rajitachandak starred syl20bnr/spacemacs
  • Aug 16 16:49
    lebensterben commented #8411
  • Aug 16 13:55
    Marlex31 commented #8411
  • Aug 16 13:24
    gealot starred syl20bnr/spacemacs
Daniel Nicolai
@dalanicolai
So then just rebind SPC f f or C-x C-f to that
Is SPC f f working now?
Momo10101
@Momo10101
'C-x C-f' is already bound to 'helm find file' as default in spacemacs
Daniel Nicolai
@dalanicolai
Okay, maybe then you are not in a file-buffer
Momo10101
@Momo10101
No, i havent tried yet, but 'SPC f f' is vim mode?

Okay, maybe then you are not in a file-buffer

I should be, i have a file open in spacemacs then i do C-x C-f, spacemacs opens the directory where the file is in, but the cursor is at the top instead of at the current file

Daniel Nicolai
@dalanicolai
Yes I see it is bound to spacemacs/helm-find-file, not helm-find-files
(define-key global-map (kbd "C-x C-f") 'helm-find-files)
Evaluate that line to rebind it
So you are using emacs editing style then?
Momo10101
@Momo10101

Evaluate that line to rebind it

Sorry, how do i do that?

So you are using emacs editing style then?

Yes, i prefer that than vim style

Daniel Nicolai
@dalanicolai
Okay... have you tried vim style? Using SPC is very convenient
But whatever you prefer of course
You can press M-: then insert that line end press enter
Or better, place it in the user-config section of your dotfile (and reload with M-m f e R)
Momo10101
@Momo10101

Okay... have you tried vim style? Using SPC is very convenient

Yes, i will give it a try, I didnt know that, that is the recommended way to use spacemacs

Or better, place it in the user-config section of your dotfile (and reload with M-m f e R)

Thanks a lot! that did the trick!

Is there not a way to get the spacemacs/helm-find-file to do the same?
Daniel Nicolai
@dalanicolai
Well emacs style works fine too... but generally Spacemacs users prefer vim-style and Spacemacs is designed for that

Is there not a way to get the spacemacs/helm-find-file to do the same?

Yes there is

If you look at the definition of the function you will see that that function explicitly preselects the directory instead of the file, which makes sense also...
So you can copy that function to your user init, and replace helm-current-directory with buffer-file-name
inside that function
Daniel Nicolai
@dalanicolai
Ah what I am saying is wrong
Momo10101
@Momo10101
ohh ok, pity
Daniel Nicolai
@dalanicolai
Ah no
It is still very easy
even easier
If you know what to do
So I am finding that out
Momo10101
@Momo10101
Perfect, thanks a lot! : )
Daniel Nicolai
@dalanicolai
You just place (file-name-nondirectory buffer-file-name) as second argument behind helm-find-files-1
in that function
The only thing is, helms behavior is a little weird... it places the cursor on the correct filename as long as you did not make any changes. Otherwise it places it on the temporary filename.
Momo10101
@Momo10101

You just place (file-name-nondirectory buffer-file-name) as second argument behind helm-find-files-1

In which file do i need to do this?

Daniel Nicolai
@dalanicolai
Ah okay... I see helm-find-files puts a "^" in front of the file

You just place (file-name-nondirectory buffer-file-name) as second argument behind helm-find-files-1

In which file do i need to do this?

Copy the spacemacs/helm-find-files to your user-config and do it there

But put this in that file (concat "^" (file-name-nondirectory buffer-file-name))
But then I really recommend you to read some chapters of https://www.gnu.org/software/emacs/manual/eintr.html
And take a vim tutorial if you are open to try it
It will take some time for you to learn using Spacemacs... but you made the best choice!
Daniel Nicolai
@dalanicolai
(depending on what you want to use it for. There are better 'specialized' editors, but there is no better 'general' editor, and for sure not as elegant and fun...)
Momo10101
@Momo10101
sorry, i am a bit slow to go through all this information : )
where do i find the 'helm-find-files-1' function ?
in the .emacs.d folder? I did a grep and it does not seem to be there
Daniel Nicolai
@dalanicolai
It is the last expression in the spacemacs/helm-find-files function
Momo10101
@Momo10101
ohh i see!
Daniel Nicolai
@dalanicolai
You type C-h f then space find file
Ah okay