Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 08:35

    smile13241324 on develop

    [bot] "built_in_updates" Sat No… (compare)

  • 08:35
    smile13241324 closed #15833
  • 08:34
    SpacemacsBot synchronize #15833
  • 08:34

    smile13241324 on develop

    [bot] "documentation_updates" S… (compare)

  • 08:34
    smile13241324 closed #15834
  • 06:13
    SpacemacsBot opened #15834
  • 06:13
    SpacemacsBot synchronize #15833
  • 06:12

    smile13241324 on develop

    Create layer 'apache' (#15812) … (compare)

  • 06:12
    smile13241324 closed #15812
  • 06:11
    SpacemacsBot synchronize #15833
  • 06:10

    smile13241324 on develop

    Defines "B" key bind for ebib t… (compare)

  • 06:10
    smile13241324 closed #15831
  • 06:09
    SpacemacsBot opened #15833
  • 06:09

    smile13241324 on develop

    [doc] remove user tracking with… (compare)

  • 06:09
    smile13241324 closed #15832
  • 05:47
    smile13241324 commented #15790
  • 05:27
  • 01:22
    cpaulbond starred syl20bnr/spacemacs
  • Nov 25 21:59
    Dfango starred syl20bnr/spacemacs
  • Nov 25 08:27
    pataquets commented #15790
Momo10101
@Momo10101
ok strange, its a clean install of spacemacs on Ubuntu
Daniel Nicolai
@dalanicolai
You did not change the .spacemacs file?
Momo10101
@Momo10101
no, but let me try to do it from scratch again
in any case, do you know what i would have to rebind C-x-f to get the behavior i want? I want it to be 'helm find files', but i just want the cursor to point at the current open file
Daniel Nicolai
@dalanicolai
Well, it is not as straightforward as I thought.
I thought let's make the filename the initial input, but then the other files and dirs are not listed
Luckily it should be easily possible in helm emacs-helm/helm#1014
Daniel Nicolai
@dalanicolai
Ah that does something different
oops
Momo10101
@Momo10101
ok
its strange because the default behavior for 'helm find files' is for the cursor to point at the current open file
a least when i use it in vanilla emacs
Daniel Nicolai
@dalanicolai

its strange because the default behavior for 'helm find files' is for the cursor to point at the current open file

Yes I just dicovered that now

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